### snarknews's blog

By snarknews, history, 7 months ago, translation, ,

Traditionally, SnarkNews runs two New Year Contests.

The New Year Blitz Contest (Multiple Language Round) will start at 18:00 31.12.2017 and ends at 06:00 01.01.2018 Moscow Time. Contest consists of 12 problems. Some of those problems are based on problems, used at official or training contests in 2017. Contest rules are based on the ACM system with two important modifications.

1. Penalty time is calculated as distance between time of first successful submit for the contestant on this problem and 0:00:00 01.01.2018, i.e. successful submissions at 23:50:00 31.12.2017 and at 0:10:00 01.01.2018 will both have penalty time 10 minutes (600 seconds).

2. Multiple Language Round rule: If for the first successful submit for the contestant on the some problem was used the programming language, which was never used by this contestant in his previous first successful submits on other problems, contestant receives language bonus: his summary penalty time is decreased by 100 minutes (6000 seconds). Note that different implementations of the same language are counting as same language, i.e. Java 6 and Java 7 are both counted as Java, C++ 32 bit and C++11 64 bit both as C++. Additionally, C and C++ are counted as same programming language.

Contest will be running on Yandex.Contest system. Link for registration and participation.

14'th Prime New Year Contest will start at 0:00 30.12.2017 and finish at 23:59 10.01.2018 Moscow time. Traditionally, Prime New Year Contest consists of problems, which were presented at team programming contests in 2017 and never solved on the contest. For the Prime New Year contest plain ACM rules are used.

Idea of Prime Contest was first implemented by Andrey Lopatin and Nick Dourov at Summer Petrozavodsk training camp at 2003; in Russian word "Prostoj" used in meanings "prime" and "easy", so, contest was called "Prostoj contest" but was composed of extremelly hard problems, numbered with prime numbers (2,3,5 etc). Since then such a numeration is traditionally used for contests, consisting of very hard problems only.

Contest will be running on Yandex.Contest system. Link for registration and participation.

Both contests have English statements. Registration is open till the end of the contest.

•
• +76
•

 » 7 months ago, # |   0 Auto comment: topic has been translated by snarknews (original revision, translated revision, compare)
 » 7 months ago, # |   +3 Yes, Prime Contest is announced, now I can sleep peacefully :).
 » 7 months ago, # |   +13 I am willing to offer special prizes to first solvers of problems 19 and 23 (because I set them). =)
•  » » 7 months ago, # ^ |   +41 Hello, desert97 and ksun48 were able to crack this one. (submitted under handle snoweverwyhere) Took us quite a long time.What's our prize? =)
•  » » » 7 months ago, # ^ |   +26 Specifically, we did 23, not 19.
•  » » » 7 months ago, # ^ |   +16 Great job! Please PM me your mail address so that I can send you something. =)
•  » » 6 months ago, # ^ |   +8 Isn't the problem 23 from Winning Ways for Your Mathematical Plays?
•  » » » 6 months ago, # ^ |   +8 It could be! I didn't read the entirety of WWFYMP and didn't see this problem there. There is a similar problem in ONAG (Conway's On Numbers and Games) with triminoes instead of dominoes. The triminoes game is kinda complex, but happily the dominoes game can be analysed with relatively simple tools.
•  » » 6 months ago, # ^ |   +8 Huh, it seems that you set 2 out of 3 hardest problems from this New Year xD (where I mean, hardest to do during contest). Third one was in my opinion 11 "Boring Game", which I consider hardest problem in whole problemset if we exclude possibility of using Google. Coming up with these formulas for multiplication of nim is literally impossible, but on New Year we may google something what explains a few ACs.I am kinda sad that I chose to google 23 as well. After few hours of experimenting I had literally everything, needed only a wrapup of all my thoughts, but chose to give up :(. As soon as I saw this problem I thought about assigning some  ± 2 - k values to every strip of contiguous dots. I noted a period of 6 if borders are fixed in results of form "WHITE/BLACK/FIRST/SECOND" and correctly classified all games where there is only one segment of dots. I noted that FIRST and SECOND are basically positions of value zero and that we can reduce SECOND completely and just count the parity of FIRST parts which will determine result of game if nonzero parts sum to zero. I noted that B..BW.....WW.....W (or B2BW5W5W) is in fact game of value zero (what can be a hint that value is divided by two every three dots). But as I noted that my backtrack on long longs fails to properly process game B2BW5W5WB2BW5W5W I decided to gave up xddd. After that it took me I think more than hour to get WWFYMP and find a place where it is described. Just to find out I basically got everything figured out by myself...
 » 7 months ago, # |   +5 Btw will there be editorials to the problems after the end of the contest? (I'm curious about the Prime contest)
 » 6 months ago, # |   0 Now the new year contest standings don't look like it counts from (in both directions) the midnight, is it supposed to be this way during the contest?
•  » » 6 months ago, # ^ |   +10 Check the special standings (link at the upper menu)
 » 6 months ago, # |   +37 Problem L be like
 » 6 months ago, # |   0 How to solve G and J (from New Year Blitz Contest)?
•  » » 6 months ago, # ^ |   0 Both of these were taken from the BAPC 2017 (problems C and G). Problems and solutions from that contest can be found here: https://2017.bapc.eu/problems/
 » 6 months ago, # |   +8 How to solve H (hardcore sequence)?
•  » » 6 months ago, # ^ |   +13 Just print n random values from 1 to 1000000000 (and watch out for integer overflow).
•  » » » 6 months ago, # ^ |   +8 Thx, I did just that, I guess I had overflow :p
•  » » 6 months ago, # ^ | ← Rev. 2 →   +8 I've submitted somewhat uniformly distributed integers in range [0, 10^9]: int x = 0; cout << 0; for (int i = 1; i < n; ++i) { x += i + n * 9; cout << ' ' << x; } 
•  » » 6 months ago, # ^ |   +21 Also this
•  » » » 6 months ago, # ^ |   0 Very nice, thanks!
 » 6 months ago, # | ← Rev. 2 →   +3 It seems that tests to "17. Cat and Mouse" are not as strong as they can be. I submitted three codes that got OK. First one is fine, second one has first bug, third one has second bug. Third code fails on a case 1 18 2 6 2 14 9 12 11 2 1 4 3 18 15 10 2 13 5 17 15 8 2 9 8 5 4 16 15 15 13 7 2 11 6 3 2 and second one fails on a case 1 11 9 2 1 3 2 10 9 11 7 9 6 7 4 4 3 6 5 5 3 8 3 I have not done these bugs on purpose after getting OK, I discovered them during local stresstests. They were appearing very rarely, maybe once per 10000 small random cases each of them. It would be very hard to create tests against them by hand, one would need to know my exact algorithm and thought of specific bugs I could have done, but it was very easy to create tests against them using stresstests. This problem had testcases, so it was very easy to do something like (T<=1e5, but sum of n's <=5e6) instead of (T<=100, n<=5e4) and if I would be given 1e5 random testcases with n=20 I would have surely failed them using second or third code.
 » 6 months ago, # | ← Rev. 2 →   0 Lolwut xDDD. In "Line Tracing" problem I struggled a lot and couldn't make my robot work on 10th test (this problem has open tests, but there's not really a way to use this). Just for fun and for sanity check I pass small tests I submitted my code to Yandex that don't pass it (it hasn't passed it at any point of its life) and expected WA on test 10. Imagine my surprise when I got "Verdict: OK, Status: Full solution" result xDDD. After this I tried few random seeds and it worked for something like 6th of them. However Marek claims that my code with his checker worked 7 out of 10 times on this test.
•  » » 6 months ago, # ^ |   0 As the author of this problem, I'd be very happy if you share your approach and thoughts about the problem after the contest end (like, did you like the problem at all). Random pass/not-pass is somewhat expected (it definitely happens "in real life"), but I'm still curious.
•  » » » » » » » » » 6 months ago, # ^ |   +8 Well, Pascal is good enough for a lot of problems. I would not expect g++ in Russian universities at all, something like Visual Studio 2003 is much more expected. for teams that would actually try doing this problem That's a good point, but I don't know any good way of estimating difficulty of an unusual problem, and definitely don't want to disqualify teams merely on the fact that they don't have some obscure software installed (e.g. gcc newer than 3.4.5, Java >= 7 or Python >= 2.5). Moreover, if we write in C++/Java only, it definitely disqualifies teams which do not know the other language.I think the way to go in the future would be to provide a web-based tool with no useful stuff inside and a bunch of generic formulas/functions in all languages supported by OpenCup. I believe it shouldn't be a problem to generate a bunch of C-style functions like go(double motorLeft, double motorRight) which assume that there are some global variables which hold the state.