goryinyich's blog

By goryinyich, 11 years ago,

Hi there!

I'm the author of today's CF round.

During the round you'll again assist far away kingdom citizens in solving their everyday problems.

I want to thank Artem Rakhov for invaluable help during the round preparation, Maria Belova for translation of the problems, Mikhail Mirzayanov for excellent CF system and all participants for not leaving this event without your attention.

More AC verdicts and high rating to all of you! gl & hf

UPD: Round is finished. Congratulations to winners and awardees in both divisions!

Div-1
3. Egor
6. Coder
8. neal
9. WXYZ
10. whhone

Div-2
2. songlj

UPD: Round editorial is published. Russian version will appear soon.

• +90

 » 11 years ago, # |   -14 Thanks for preparing this round! Good luck to all the participants :-)
 » 11 years ago, # | ← Rev. 2 →   -13 Hi Sergei!Thank you for your round. This event help me to rest and relax of boring examinations. I suppose that the problems is good and I'll get enjoy of this round.
•  » » 11 years ago, # ^ |   +21 And to practise english a little bit :)
 » 11 years ago, # |   -7 Thanks for the preparation! It's your efforts that will give us a meanful night (in my nation) !
•  » » 11 years ago, # ^ |   0 orz npc                                                                                                        langren...
•  » » » 11 years ago, # ^ |   0 orz shenben held all rooms
 » 11 years ago, # |   +59 +5 mins. Why? :) The contest is running away from us D:
•  » » 11 years ago, # ^ |   +8 Doesn't matter, had time? :D
•  » » 11 years ago, # ^ |   +13 Together with system testing.
 » 11 years ago, # |   -9 Maybe the contest is scared :)) Anyway,good luck everybody :D
 » 11 years ago, # |   +3 A very mathematical round. Thanks just as much.
 » 11 years ago, # |   +68 A and C are implementation problems. Have seen B before and D is based on known idea which was used in IPSC 2010 task K. I expected more from this author.
 » 11 years ago, # |   +1 Am I the only one who wrote the complicated DP for problem C (div 1)?
•  » » 11 years ago, # ^ |   -8 ... which wasn't quite right? You are not the only one.
•  » » » 11 years ago, # ^ | ← Rev. 2 →   +8 I compared the maximum number of T-shape thing with tourist's solution. All my answer was correct. I hope my printing the board was correct too :(Edit: final test passed :D
•  » » » 11 years ago, # ^ | ← Rev. 2 →   0 Разве не работал перебор?Вроде простая динамика, ну немного более техническая, чем обычно.Why not DP?It was a rather simple one, though a bit more technical than usual.
•  » » 11 years ago, # ^ | ← Rev. 2 →   +8 Am I the only one who wrote the compilacated code for problem C (div 1) and didn't even pass pretest? :( http://codeforces.com/contest/142/submission/1040136
•  » » 11 years ago, # ^ |   0 I wrote the complicated DP too..
•  » » » 11 years ago, # ^ |   0 and my solution is fast enough to solve n=m=9
•  » » » » 11 years ago, # ^ | ← Rev. 2 →   0 My solution is fast enough to run all 81 possible test case in 1s :)May be the limit should have been min(m,n) <= 9, max(m,n) <= 20 ?
•  » » » » » 11 years ago, # ^ |   0 My DP solution is a little bit special. It will get TLE when max(m,n)<=20.
 » 11 years ago, # |   -14 Very fast System testing today.Its making up for the 5 mins delay in the start of the round.I liked this round....Was logical and mathematical one...........:)
•  » » 11 years ago, # ^ | ← Rev. 2 →   0 not ST yet...:)
•  » » » 11 years ago, # ^ |   +13 I think he meant system test was fast for div 2
 » 11 years ago, # |   0 Can someone please point out why my solution to problem A (div2) in Python kept getting runtime error on pretest 1, even though it ran fine on my side. I had to re implement the exact same solution in C++ to get it AC. Darn! Here is the code: #
•  » » 11 years ago, # ^ |   +6 Ghm. Maybe I misunderstand something, but sys.exit(1) looks strange. Return code 1 means runtime error in any programming language.
•  » » » 11 years ago, # ^ | ← Rev. 2 →   +3 Ah damn. I think you are right. What a silly oversight.Thanks.
 » 11 years ago, # |   -33 wow! Greatest contest i've ever seen! I think this was a record for Div 2 to have ~2000 registered people! Thanks Codeforces
 » 11 years ago, # |   +10 Editorial please
 » 11 years ago, # |   0 i realize a useful "cut case" technique which sometimes works (like problem C this time) by reading others' codes...=D        // "useful" technique XD        if (clock() - start > 2.7*CLOCKS_PER_SEC) return;(this technique was once used by my team in an acm-icpc regional contest too.)
•  » » 11 years ago, # ^ | ← Rev. 2 →   -7 You can improve this even more.clock() function and floating-point comparison aren't the fastest operations.We usually use something likeconst int MAX_ITER = 80000000;int curIter;void solve(int x, int y){ ...    if(curIter > MAX_ITER)        return;    curIter++; ...
•  » » » 11 years ago, # ^ |   0 in the regional contest experience i mentioned above, we used exactly the method you suggested: count number of iterations in the searching functionthis worked well since our machine was (theoretically) identical to the judge machine(e.g., we found that 1,000,000 iterations ~= 1 second, the number of test cases <= 10, and there is 10 second time limit, so it should be save to set MAX_ITER = 1000000)while this method is also practical. however, in Codeforces/SRM/...etc contest, it may be a bit less convenient to "estimate" MAX_ITER, since the environment setting is a bit different.
•  » » » » 11 years ago, # ^ |   +2 There is a Launch option. You can run your solution using Codeforces servers and see how long they work.For example: http://codeforces.ru/problemset/customtest
•  » » » 11 years ago, # ^ | ← Rev. 2 →   -10 It seems to me that it's greater to use clock(), but not as mentioned above, but somehow like this:const int ITER = 1000;const float MAX_TIME = 2.8;int iter = 0;...if (!(++iter % ITER))  if ((float)clock() / CLOCKS_PER_SEC > MAX_TIME)    return;...It's better because we don't know, how much iterations our algorithm can do in time-limit; in my variant it will work exactly MAX_TIME (+/- EPS), and won't slow much because we check time only each ITERth iteration.
•  » » » » 11 years ago, # ^ |   -10 When iterations where answer exists work immediately, and time-limit cut-off need only for last iteration where no answer exist, there is no need for any optimization.
 » 11 years ago, # |   0 Can you please post the tutorial for this round?!
•  » » 11 years ago, # ^ |   0 Done
•  » » » 11 years ago, # ^ |   0 Thank you very much :-)
 » 3 years ago, # |   0 this submission shouldn't have passed it was missing a case and I added it herehere a test case: 12 5 20 10 8 9 the output should be -1, but it outputs 5 7 2 3