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:
Contest Admin and Statement Verifier : Shreyan Dominater069 Ray
Text Editorialist : Nishank IceKnight1093 Suresh.
Tester: Sushil SmolBrain Raaja.
Setters: Shreyan Dominater069 Ray, Nishank IceKnight1093 Suresh, Proof_by_QED.
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!









Contest starts in ~30min.
codechef ❌ cheater's den
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.
Solved Game Hard Version with binary search but what's the proof of monotonicity?
Can you link your submission please.
https://www.codechef.com/viewsolution/1173430591
Game(Hard) simple greedy solution. O(N logN) https://www.codechef.com/viewsolution/1173539763
I tried solving Game(easy) using recursive dp, but got TLE
Codechef Submission
Your dp has 3 parameters, with
0<=i<n, 0<=coins<=2n, 0<=x<=nso your algorithm's time complexity is cubic.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
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
Thanks for the templates.
I just changed
const int mod = 998244353;toconst ll mod = 998244353;, it passed.Submission