Ved787's blog

By Ved787, 30 hours ago, In English

We invite you to participate in CodeChef’s Starters 164 aka Shaastra Programming Contest conducted by Shaastra IIT Madras and sponsored by KLA, this Wednesday, 11th December, rated upto 5 stars (i.e. for users with rating < 2200).

Time: 8:00 PM — 10:00 PM IST

Joining us on the problem setting panel are:

Contest Admin and Statement Verifier: Shreyan Dominater069 Ray

Text Editorialists: Nishank IceKnight1093 Suresh

Tester: Apoorv tyr0Whiz Kumar

Setters: Ved Ved787 prakash, Shanmukh Scintillator_Sha Raj, Varun Phantomduel Koushik.

Register here and also please fill out this form to be eligible for the offline finals where prizes worth 120K INR await!

All competitors who solve at least one problem will be entered into a raffle for winning exciting Shaastra's Merchandise!!

Written editorials will be available for all on discuss.codechef.com. Pro users can find the editorials directly on the problem pages after the contest. The video editorials of the problems will be available only to Pro users.

Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here. Hope to see you participating.

Good Luck!

  • Vote: I like it
  • +45
  • Vote: I do not like it

»
16 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Do we need to solve problems that are unrated for our division as well for the Shaastra ranklist?

  • »
    »
    14 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No. You are not required to solve the unrated problems for your division.

    • »
      »
      »
      14 hours ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Alright! Thanks for the info

»
9 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

Contest starts in ~20 Minutes

»
7 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

What are the prizes?? And How can someone know if he is selected for any prize??

»
7 hours ago, # |
Rev. 4   Vote: I like it +9 Vote: I do not like it

fuck permutations question. its always some stupid pattern guessing. Also what a joke of an editorial for construct perm question. I dont get how fucking 800 people solved it in div2, was it gptable ?

  • »
    »
    7 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Seriously, it took me 1h+ and several simulations to get the pattern. Didn't have time for the simple Connecting Wells problem because of it. It's crazy that this is the second most solved, even more than the xor one.

»
7 hours ago, # |
  Vote: I like it +7 Vote: I do not like it

Shit problems in Div1

»
7 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

in construct permutation i had that if all prefix sum of permutation modulo $$$n + 1$$$ is unique the it is valid, then construct pref sum modulo $$$n + 1$$$ as $$$pref = $$$ $$$[1, n, 2, n - 1, 3, n - 2...]$$$
and then for each $$$i$$$ find a number $$$x$$$ which when placed at index $$$i$$$ will give $$$pref[i]$$$
but i don't have a proof that we will always find such a uniqe number $$$x$$$ everytime
also if the above solution valid then we can solve the problem in $$$O(n)$$$ so i wonder why $$$n <= 10^3$$$

  • »
    »
    7 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I solved since I saw many participants solved (even more initial B) , then I said let's guess bro xD.

  • »
    »
    7 hours ago, # ^ |
    Rev. 3   Vote: I like it 0 Vote: I do not like it

    because the problem setters are incompetent cucks that should not be setting questions. Just look at them. Barely experts. I dont understand why codechef would allow these people to conduct the main contest. If a college wants to hold a contest let them do it separately.

    • »
      »
      »
      43 minutes ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Construct permutation is one of the 2 only problems i created for the round.

»
7 hours ago, # |
  Vote: I like it +4 Vote: I do not like it

Shit Time constraints for Connecting wells Kruskal's doesn't pass...

  • »
    »
    4 hours ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    I used DSU with Binary Search. The time complexity is (n^2 * log(10^9)). Basically for every mid you find with BS, Check if it makes a single component or not.

»
7 hours ago, # |
  Vote: I like it +1 Vote: I do not like it

Is there a proof for the solution to CONSPERM or an intuitive way to get to the prefix sum permutations array without simulations?

»
6 hours ago, # |
  Vote: I like it +1 Vote: I do not like it

Every platform passes through highs and lows , the starters 163 which I was the main author there , people seem to like it , but now people seem not.

It's normal , We cannot make a round enjoyable by everyone , starters 163 was kinda educational , so beginners love it , that's why .

Personally , The problems were good and as Dominater069 mentioned earlier

People are not supposed to guess complexities by given constraints

that's why C's constraints were tricky .

I'd like to say Dom and authors played a good job on making this round happen and we need to believe that it's a lack of our experience that we are not good enough in certain topics , so instead go and improve , because guilting others isn't good.

The point is it depends on the platform standards , reviewer standards and testers feedback mainly , So you cannot blame someone specifically as it's shame to blame the authors or the reviewers .

»
6 hours ago, # |
  Vote: I like it +3 Vote: I do not like it

Did anyone manage to pass Div 1 problem C with DSU? For every pair of nodes, I find the time when they will connect and then I merge the nodes in the increasing order of times and break when all gets connected but I keep getting TLE even though the complexity is O(N**2)alpha(N) if I am not wrong.

  • »
    »
    6 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes I have used Binary Search + DSU , which has time complexity of O(N^2 * log(1e9)) , It managed to pass though :

    link to submission : https://www.codechef.com/viewsolution/1114263702

    • »
      »
      »
      6 hours ago, # ^ |
      Rev. 3   Vote: I like it +3 Vote: I do not like it

      Edit: I converted this to C++ and got AC. So, I guess really tight constraints:(

  • »
    »
    6 hours ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes, I was also getting TLE on same approach. I converted local array to global array and it got AC.

  • »
    »
    4 hours ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    I was also getting TLE many times using that, you can reduce the time complexity to $$$O(N ^ 2)$$$ using the fact that graph is dense and use prims algo to get the mst.

»
4 hours ago, # |
  Vote: I like it 0 Vote: I do not like it

I got caught lacking on the previous CF round where you also had to brute force to find some pattern to construct a permutation, managed to solve it this time : )