Hello everyone!
It’s time for the second round of the VK Cup 2012. Let me remind you that the registration for this round is also required and it’s closed five minutes before the start.
The problemset has been developed by various authors from VK, Codeforces and Saratov State University. We worked hard to make this time interesting for competitors and to have the best ones in the next round.
This round will be run according to Codeforces rules: with room assignments, hacks and usual score decrease. It will be rated for you either if you participate in VK Cup or just solve it as a normal round.
Top 175 competitors will advance to the second round immediately. 25 more competitors will advance to the second round via the second unusual rules wildcard round on March 28. This round will consist of only one problem with inexact solution.
Please, to make the round even more interesting for you, read the statements of ALL problems.
Good luck and try to win!
No english version?
Fixed :)
Superfast systests, thumbs up :)
Yeah, thanks for the speedy tests!
The contest is over but I still can't view other's code...why ? Need I just wait ?
yes, now system is in safe mode
edit: posted in the corresponding thread my apologies the titles look extremely similar :)
Somebody could explain me how this solution pass under the 2 seconds time limit, me and another five people got unsuccessful hacks in my room (my guess is because of the codeforces server speed): http://www.codeforces.com/contest/169/submission/1412269
How can I avoid this kind of situation in the future? Thanks
This isn't even a problem from this contest :/
from div2.
for 10^9 iterations only 10 ms. Looks like compiler is optimizing the loop into a single statement. Modern days compiler are so smart.
I can't decide the complexity of my code: ---> here Is it O(n^2) or O(n^3) ?
O(n^3): You have O(n^2) states and O(n) moves from each state.
Also, you can try launch your solution with n = 1000 and n = 2000 and measure running time. Is t2 / t1 = 8 -> O(n^3)
t2 / t1 = 4 -> O(n^2)
Nice technique. Thanks.
It's O(n^3).
when to update the rating?
In the Div.2 problem B, this is a very ambiguous statement : "You are allowed to use not all elements from s." I thought we could never use all the elements of s and this caused my solution to fail.
Hm... You could never use all elements. In 2nd test from statement we never uses element.
Output: 987 ~~~~~
For example: Input: 1111 9999 The answer is 9999 and in this case we use all the elements of s. In my code initially, I was getting the answer 9991 without using all elements of s.
I think the difference between "allowed to use not all" and "not allowed to use all" is pretty clear.
This is not ambiguous at all.
Where can I fill my address if I get a T-shirt?
There are many coders failed in problem B Div1 because they didn't make enough iterations in the binary search.
But I made too many iterations and got TL :)
Then, you should binary search for the correct value. :)
Edit: I think you should ternary search. :)
Yes, I made 50 while 80 was enough. There should be an option to change 1 byte of the solution after the contest ;)
W8ing 4 d editorial
tourist is going to be the first target at Codeforces!
2 floating-point problem, not so nice. I failed problem C because I didn't set precision for cout. Beside that, the problems are nice.
Can someone explain to me what the checker output means?
It's rational number.
ja = Jury answer, pa = Participant answer
Thanks for the reply. But isn't my answer the same with the jury answer?
Close, but no :)
999990001%99999 = 1 999990001/99999 = 10000
I'm not sure I'm following you. I've just computed this with my calculator:
99999/999990001 = 0.0001 1/10000 = 0.0001
Your calculator is not accurate enough.
Try compare 999990001/99999 and 10000/1 (if a=b then 1/a=1/b)
999990001 * 0.0001 = 99999.0001 != 99999. So, 99999/999990001 != 0.0001
ja = jury's answer, pa = participant's answer
Could someone tell me why 1417148 got WA on test 7 but 1417142 got Accepted? The only difference is in the function "verify", 1417142 which got Accepted HAD a line
fprintf(stderr,"I love Mike Mirzayanov.");
,and WA one didn't. Really fun :)maybe yet another g++ bug?
UPD: Works in MSVC++.
Isn't it obvious from what you are printing :) ?
because judge system loves Mike Mirzayanov too)
This happens because of a precision problem. GCC actually compares 80 bit doubles instead of 64 bit, so if you don't add an epsilon they don't compare to equal. The reason why it works with printf is a little more complicated and has to do with the cache being cleared up when you call the function.
More info here: http://apps.topcoder.com/forums/?module=Thread&threadID=440256&mc=26
EDIT: look at this 1417682
Any Tutorials (In English)?? and how do we come to know in whose blog tutorial is posted after each contest??
http://mirror.codeforces.com/blog/entry/4187?locale=en
For [http://mirror.codeforces.com/contest/169/problem/B](Problem B) , "You are allowed to use not all elements from s." ,it simply implies that we are not allowed to use all elements from s.But the my solution that is accepted ,uses the fact that all elements can be used.I could not pass the pretests due to this ambiguity.Can anybody explain?????
There is a difference between phrases:
"You are allowed to use not all elements from S"
and
"You are not allowed to use all elements from S"
If you are allowed to do something, it does not mean that you are not allowed to do the opposite.
So if this was actually allowed, then what did the sentence actually want to convey(what was the use of adding that sentence) ,simply nothing... ,I hope this is not a Grammar competition
It's actually a reminding sentence. Problem-setter doesn't want to repeat answering clarification like "am I allow to ..." (yes, you do — in problem statement). Also, it may be a misleading corner case so problem-setter stresses on it.
Edit: it's not a grammer competition, of course. You will see this kind of sentence often, and in most cases, the purpose of problem-setter is good (i.e. try to make thing clearer, not try to be evil and cheat you :P)
I agree with you,but I lost a hell lot of rating due to this.. :(
And strangely enough, there is no difference between:
“It is not compulsory to use all elements from S”
and
“You are allowed to use *not* all elements from S”
still I guess a better statement could have been used.
I also made the same mistake and when I tried to convey the ambiguity above, I got a lot of negatives for my comment. I think the statement was very complex to understand in the contest environment and could be explained in a better way or with a simple test case.
Did you consider clarification from author during contest ? They are always there. Click on Ask, on Problems page.
It took me much time to find out that the c++ compiler on the grading server does not support %Lf (to output long double). Maybe there could be added a warning if you submit code containing %Lf (as with %lld).
Any tutorials coming?
Especially for you. http://mirror.codeforces.com/blog/entry/4187
When will the T-shirts be sent? =D
The announcement section says, "All Round 3 contestants will receive VK Cup T-Shirts". So I think you should participate ( or at least register (?) ) in round 3 to receive T-shirts. Admins, please confirm !
I found that I forgot to register,when submit