Dominater069's blog

By Dominater069, 9 months ago, In English

We invite you to participate in CodeChef’s Starters 195, this Wednesday, 16th July, rated for 5 star (i.e. for users with rating < 2200).

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

Joining us on the problem setting panel are:

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
  • +14
  • Vote: I do not like it

»
9 months ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

Contest starts in ~30min.

»
9 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

codechef ❌ cheater's den

  • »
    »
    9 months ago, hide # ^ |
     
    Vote: I like it +9 Vote: I do not like it

    Sad to say, but most Indians on platforms like LeetCode, Codeforces, and CodeChef are cheaters — just chasing ratings and badges instead of actually learning. I'm Indian too, but this is the truth.

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

Solved Game Hard Version with binary search but what's the proof of monotonicity?

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

I tried solving Game(easy) using recursive dp, but got TLE

»
9 months ago, hide # |
Rev. 3  
Vote: I like it 0 Vote: I do not like it

I am not sure why my solution to last problem is giving TLE. My code ran about 5 sec, in local editor. I did same idea mentioned in editorial, (NTT convolution, binary exponentiation on polynomials — optimizing by trimming the polynomial to degree N, cayley formula)

Can someone please look at my submission, and suggest any optimizations.
Codechef Submission

  • »
    »
    9 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    it seems like your NTT template is just a lot worse for whatever reason.

    I would recommend you to use atcoder template. I tried modifying your code with my mint class and ntt template (the ntt is from atcoder), and it ran much faster but there is some WA error I caused. Here is the submission : codechef Submission