ನಮಸ್ಕಾರ ಕೋಡ್ಫೋರ್ಸಸ್ (Hello Codeforces)!
We invite you to participate in CodeChef’s March Cook-Off, this Saturday, 5th March, rated for all.
Time: 8 PM — 10:30 PM IST. Note the new schedule.
Web3 giant Chingari is onboard to pick their recruits in the areas of Machine Learning, Rust and Web3.
These job openings are for Indians, and Non-Indians (who can work from home), and are experienced in any of the following: Rust, React, Golang,C/ C++, Python, Machine Learning, Deep Learning, Data Mining, Recommendation Systems etc. You’re also a desirable candidate if you have a deep understanding of the blockchain and cryptocurrency space and smart contract systems, specifically having a good understanding of Solana. The application for the openings are given in the Cook-Off contest landing page.
This edition of CookOff is part of the NITK annual CP contest called Inscription. We have many more tech events under our annual tech fast called Engineer 2022. You can check our events out here. Most of the problems of this contest were written by the undergraduate students of NITK ^_^
The contest will be 2.5 hours long. There will be 7 problems in Div 1/3 and 8 problems in Div 2/4. It will be rated for all four Divisions.
Joining me on the problem setting panel are:
Setters: Soumyadeep soumyadeep_pal_21 Pal, Janmansh janmansh Agarwal, Jeevan Jyot JeevanJyot Singh, Nanda very_slow Kishore, Chaithanya Dragonado Shyam, Pranav pranavdv, Yahor 244mhq Dubovik, Tadija TadijaSebez Sebez, Jay L_lawliet27 Faldu
Tester: Takuki tabr Kurokawa
Statement Verifier: Jeevan Jyot JeevanJyot Singh
Editorialists: Adithya infinitepro, Kanhaiya notsoloud1 Mohan, Srikkanth srikkanthr R
Contest Admins: Ashish Ashishgup Gupta, Nishant nishant403 Shah
Head Admin: Alex Um_nik Danilyuk
Prizes:
- Top 10 global Division One users will get $100 each.
- Top 25 Indian Division One coders to get Amazon Vouchers worth Rs. 1500 each.
The video editorials of the problems will be available on our YouTube channel as soon as the contest ends. Subscribe to get notifications about our new editorials.
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!
happy to participate now that codechef plagiarises copied codes
Fair competition
Are you sarcastically accusing CodeChef of plagiarism?
unfortunately leetcode biweekly and march cook off at same time :'(
Leetcode has a virtual contest option.
Reminder: Contest starts in 30 minutes.
Atcoder > Codeforces >> Leetcode >>>>>>> Codechef
Why is Codechef hated? I'm not a usual participant but I find the problems interesting, which I think is enough to enjoy.
What is this judge's error?
I also got this error 3-4 times, but then I swapped my interactor functions, and removed the
cin
lines I used to input graph, and it got accepted.Here is my submission: https://www.codechef.com/viewsolution/59762329
After an hour thinking about NANDXOR, I just tried $$$O(n^4)$$$ brute force with $$$min(n, 100)$$$ without having convinced myself that a solution would be found, and it passed. I guess that's the intended solution but I feel like cheating for not being able to prove it.
Hint: Pigeonhole principle.
I noticed about the 30 possible values but I was confused about what would happen if two equal popcounts share an element of the array. It turns out we just need 62 elements so we have 31 non intersecting pairs. Thanks.
[Deleted]
lmfao my code with random_shuffle() 100 times passed NANDXOR
This is because there are only ~30 possible values of the number of set bits. So random shuffling gives you a 1/30 chance of finding a valid pair. The chance of finding it over 100 such attempts is: 1 — (29/30)^100 => 97%.
Oh right, thanks for the explanation!
Can someone tell what is the 18th test case for NANDXOR? I tried to debug for almost two hrs, still not able to find the issue with the code.
Can someone tell why this code gives wrong answer? link.
Here I have used the logic that since popcount() can only give 32 values so it will always repeat after some fixed number of pairs and I am considering more than required amount in my interations I think.
I think it might be because of outputting a trailing space after the fourth number. I had the exact same issue in the contest, with no idea what's wrong, and only after the contest I thought that maybe that could be the reason, and yeah: https://www.codechef.com/viewsolution/59771506 vs https://www.codechef.com/viewsolution/59771417
Odd that the checker did not accept a trailing space, as it usually does on every platform :v
I tried removing the extra space as well but it is still giving a WA when I submit it link.
I have already spent quite a few hours on it but could not find the mistake :(
Thanks a lot, finally I was able to understand my mistake.
My mistake in NANDXOR is I sorted the array and I didn't realize that :/ removing sort passed :/ :/
Thanks a lot for the contest, I really enjoyed it.
Okay, so are we just going to ignore the fact that checker for problem "Dragonado And XOR" seems to be broken? Trailing space casued WA for me, and I believe even on Codechef you ignore trailing spaces in all other problems by deafult? Even if not my "incorrect" submission gets WA only on testcase ~19 (not earlier), which is even stranger. Links to submissions (the only difference is putting trailing space everywhere in one of them): AC WA
Can someone elaborate? Dragonado
I'm not entirely sure, but I believe CodeChef runs your code on all the testcase regardless of the verdict. so just because it says running test 19 doesn't mean the first 18 have gotten AC verdict. I've submitted completely invalid code and got it run on all the cases, but again, don't quote me on that one.
Ashishgup tabr very_slow For the problem "Dragonado And XOR" I was getting WA because I was printing space after the last printed integer.
Shouldn't this be taken care of by the checker?
AC: https://www.codechef.com/viewsolution/59774092
WA: https://www.codechef.com/viewsolution/59774089
I faced a similar issue and took a lot of time to finally realize it. It should be explicitly mentioned if this was intended.
Here is the link of my submission during the contest: https://www.codechef.com/viewsolution/59774459
Here is the link to my submission after the contest: https://www.codechef.com/viewsolution/59774459
I couldn't figure out this during the contest, though I doubted the checker and queried about the checker, and they replied checker was OK.
It could have been an excellent contest for me, but got a negative delta instead :-/.
CodeChef_admin Ashishgup nishant403 tabr
Ig they have updated the checker and rejudged all the submissions and accordingly updated the ratings. But still, is it fine to do so? Like some users may have been trying it and wasted time on that NANDXOR problem, which if they could have got the AC verdict in one go, they may have solved the next problem as well. This was an issue from their side, so why don't make the round unrated for the users who are getting a negative delta just because of their mistake.
Thanks a lot.
You have taken max 15 for n, shouldn't we try max 62 for n?
What was the logic?
You only need to check 62 pairs, by taking the first 15 elements you can generate (15*14)/2=105 pairs.
Edit: this is incorrect because we cant ensure pairs don't share an element.
How do you know your pairs don't share an element? It is clear that having 62 elements you can get 31 pairs not sharing elements. I'm not sure about what you said though.
I also faced the same issue and got 2 WAs before getting AC.
I think that the tests for Dragonado And XOR might be weak. My solution where I am checking only the first ten elements works.
There are only 30 values possible. For the first 10 elements, you have approx 45 pairs.. so there is high chance 2 pairs might match.
The problem NANDXOR had an issue in the checker — participants outputting extra whitespaces were getting a WA instead of AC. The checker has been fixed, all non-AC submissions rejudged, and ratings recalculated. A total of 26 users across all divisions had at least one of their submission's verdict changed due to the rejudge, and we apologize for this mistake. Among those 26 affected participants, 8 users had their rating decrease for the contest, and that decrease has been reversed for them to have a net of +0 rating change in this contest. That is, the contest is unrated for those 8 participants. An email has been sent to all the 26 affected participants.
Apologies again for the issue.