We invite you to participate in CodeChef’s July Cook-Off, this Sunday, 3rd July , Rated for All. Time: 8:00 PM — 10:30 PM IST
Joining me on the problem setting panel are:
Setters: Valerio TheScrasse Stancanelli, Soumyadeep soumyadeep_pal_21 Pal, Tejas tejas10p Pandey, Lavish lavish315 Gupta, Nandeesh nandyboy Gupta, Danish danishiitp_24, Aryan Aggu_01000101 Agarwala, Seemanta border Bhattacharjee, Danny dannyboy20031204 Boy, Yash DenOMINATOR Goyal, Cozma tibinyte Tiberiu-Stefan, Anmol .-O_O-. Choudhary, Ashley errorgorn Khoo
Tester: Harris gamegame Leung
Statement Verifier: Kanhaiya notsoloud1 Mohan
Contest Admins: Radoslav radoslav11 Dimitrov
Head Admin: Alex Um_nik Danilyuk
Editorialist: Đặng Đoàn Kuroni Đức Trung
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!
As a setter, I setted.
Is there something wrong about test case of segmentation fault (div2C)?
Nice, balanced contest. Thank you! Let me give some feedback for div1:
I only read (and solved) three problems, so will be a bit limited.
segfault: nice, easy problem. Mostly implementation, but requires a bit of thinking if you want to do it without pain.
LCM: A typical "random math" problem where you bruteforce the thing to see the pattern immediately without too much thinking. Not a big fan of those, but the pattern was somewhat surprising... Handling the case of all equal numbers in the sequence was super easy once I realized how to do it nicely, but took me ages to arrive at that conclusion. I liked how it wasn't "bruteforce then trivial", definitely a nice problem (although I was a bit annoyed at the start with "yet another bruteforce").
PQ: the idea is quite obvious, mostly an implementation exercise. I believe standard problems should appear in contests, so happy to see it. Even though it wasn't particularly brilliant.
Overall, I liked my first contest after a couple months. I was happy to see that only one of three problems I read were combinatorics, I'll consider coming more often :)
Thanks for the feedback! Really appreciate it.
I thought about Subsequence LCM like this:
Let R[i] = a[i]%M where [l,r] is the range of indices of the subarray and r-l+1 = M.
Case 1: Let LCM(M,a[i])-a[i] = k; if R[i] = 0 for some i in [l,r] then then LCM(a[i],M) = a[i] => LCM(a[i],M)-a[i] = k = 0 => all elements in the subarray must satisfy LCM(a[j],M)-a[j] = 0 => all elements in subarray are multiples of M
Case 2: if there is no element for which R[i]=0 then by pigeonhole principle at least 2 elements in the subarray must have same remainder with M. Let a[i]%M = r and a[j]%M = r. GCD(M,a[i]) = GCD(M,r) and GCD(M,a[j]) = GCD(M,r) let the common gcd be g.
Let us assume the subarray satisfies the condition LCM(M,a[i])-a[i] = LCM(M,a[j])-a[j] =>(a[i]*M)/g — a[i] = (a[j]*M)/g — a[j] => (M-g)*(a[i]-a[j]) = 0. Since we assumed remainder!=0 for all elements, M !=g =>a[i]=a[j] Hence all elements must be equal
Who approved div1 A and B :cringe:
Contest was nice. Also I have a small question to codechef admins.. In some codechef contests it shows which test cases are accepted and which are not. But today it was giving verdict only "accepted" or "Wrong answer" not showing the label of test cases which are accepted and which are not.
The testfile-wise verdicts are shown in Subtask-type problems. Currently, Cook-Offs are the only contests which are not Subtask-type. So you can see the file-wise verdicts in all other contests, but not in Cook-Offs.
It's because of the format of the contest. Generally cookoff are ICPC styled where you will just get the feedback (AC/WA/RE etc). In Lunchtime/starters/Long you see the verdict of each test case
Thanks for the contest, I liked the problems. But, why so tight constraints for LCMSEQ?
Congrats everyone ! Hope you liked my problem ( median pairs ), and to see you participating tomorrow in Codeforces round #804!
Although this is completely irrelevant to the above post(apologies in advance) !! I needed a little help in this !!! I ran my code (https://mirror.codeforces.com/contest/1185/submission/162667577) across various other compilers and I am getting the expected output but for some reason, my code is not getting any output on the codeforces compiler, is it some compiler error or any other(extremely silly) error in my code?? A little help will be much appreciated!!
Your pre_sum is out of bounds for i == 0 and .size() method returns an unsigned integer so you need to typecast it into integer.
Enjoyed the problemset although managed to solve only 3.Can someone provide a hint for STRBRK?
Any similar problem to PQ? (Link)
CodeChef_admin Enjoyed the problems. Could solve first 2 in div1. The problems A and B were bruteforce and really liked implementing them. But the constraints were really tight for problem B.
Really enjoyed the contest. Hope we can have more Div 1 contests rather than lunchtime and Cook-off only.
Do you also cheat on Codechef or did you solve them by yourself?
It was a nice contest with great problems,Thanks.