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
1. tourist
3. Egor
4. Fefer_Ivan
5. fhlasek
6. Coder
7. RAVEman
8. neal
9. WXYZ
10. whhone
Div-2
1. vyvtjp643
2. songlj
UPD: Round editorial is published. Russian version will appear soon.
Hi Sergei!
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.
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
Разве не работал перебор?
Am I the only one who wrote the compilacated code for problem C (div 1) and didn't even pass pretest? :( http://codeforces.me/contest/142/submission/1040136
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 ?
I liked this round....Was logical and mathematical one...........:)
not ST yet...:)Ah damn. I think you are right. What a silly oversight.
Thanks.
You can improve this even more.
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.
this submission shouldn't have passed it was missing a case and I added it here
here a test case:
the output should be
-1
, but it outputs