Hello everyone!
I am an author of problems of today round. This round is for both divisions. There will be 7 problems, the first 5 of them are for the second division and the last 5 are for the first one.
About points of problems. Today they are nonstandard:
for div2: 500-1000-1500-2000-2000
for div1: 500-1000-1000-1500-2500
Be careful.
RAD helped me for preparing the round. Delinur translated statements into English.
Good luck ans have fun.
UPD.
winners of the first division
1. peter50216
2. tourist
3. ACRush
winners of the second division
1. iamcs1983
2. zyx3d
3. seanwupi
Editorial.
UPD.
Unfortunately, in author's solution of priblem E some bug was found. We thanks participant LinesPrower for detection of it. Author's solution was updated and all solutions were rejudjed. Ratings will be recalculated for all participants excluding Egor and Jacob. We apologize for this incident.
Very Nice : Surely will have a good contest :D
. This is really helpful ..
PS: .. The version of the Ruby compiler isn't clearly ...
... .. which induce me lots of CE && RE submissions more than once ..
Maybe the version is 1.9.0 or higher .. cause the String::[] is return a char ...
... And one more suggestion ... there should be one more language option named .. "Auto" .. ;)
.. literal meaning .. auto-distinguish the language according to your suffix name ...
..simply "cpp" stands for GNU CPP .. "pas" stands for "Free Pascall / Delphi "...
which could also be some user-preset perhaps ..
At the first time i read the statement , I thought n,m<=5000 ,so i have to look for a O(N*M) solution and It 's really hard to solve , why so many people accepted ? I can only solve it in O((N*M)^2) . It takes me 50 minutes to notice that n*m<=5000 , it's 1:53:00 , too late . My rating continues to decreases :( . this is the fourth consecutive time
I tried to see the input used to hack my problem A viewing my code
at "my submissions" and by double-clicking the score/points of problem A
at the "room" area. But in both cases I just saw the pretest cases, it didn't
show the hack input.
Thanks.
i think for increase speed of process!
I hope the UI of current hack window will be improved.
Link.http://www.ideone.com/BcunL.
Edit: During the contest my submission ids were:
492767
492737
492505
492349
492236
492131
492074
492035
After contest:
494437
494398
494274
494260
494238
494173
494293
You need System.out.flush() in the end
ouups, nevermind, you have closeSystem.out.println(res.toString())But did it work under your system? I have been using my template for a while now and never had problems.
Submitting it many times and getting a wrong answer on Pretest 1 is a bit frustrating. Could you post your observations on what could have gone wrong.
.
My template is similar to Egor's. I will go through it.
Edit: Oops, I meant whether my solution ran in your system.
Where was this mentioned ?
http://en.webhex.net/view/c8002611d83e594863797cee7fc5e3c6
After carefully going through Egor's Template, I corrected 2 bugs, both related to reading empty lines.
C\DIV 2.
can anybody explain me why the answer is 0 for the test case like this
5 2 9494412
5484 254 1838 18184 9421
Why does he need to do at least 3 operations? Why can't he move one diamond from 5484 to 254, and then take one from the 1838 for a total of 2 operations and resulting in 5483 255 1837
Nevermind, that would change the sums on the later parts of the array. Sorry for the confusion.Sum 1838+18184 will differ from 1837+18184.
(edit: I can't use this editor correctly...)
During the contest I used a O((R*C)^2 log (R*C)) algorithm for problem C which I thought that would work but surprisingly it got TLE. when I debugged my code after the contest, I found out that copying the "map"s takes too much time...
Chip Play For every point, starting from it dfs a time to find the length ,whether the complexity is O ((n * m ^ 2)?
1 5000
RR..R(2500)LL..L(2500)
for this test case, the complexity is O(n3).
you can use linked-list for AC , for each cell which has chip, consider four pointer.
How long can it continue? Of course, min(all(a[i])) where i is even
Consider: a[0], a[1], a[2] ... a[n-1].
Sums are (a[0]+a[1]), (a[1]+a[2]), ... , (a[n-2]+a[n-1]).
(n-1) sums mustn't change, and their sum mustn't, either.
We can see that a[0] and a[n-1] are counted once, while the others are counted twice. Therefore, if Joe want to get 1 more diamond, he will move 1 diamond from a[0] (or a[n-1]) to the middle, so it will be counted once more, and move 1 diamond from a[n-1] (or a[0]) to his pocket.
This is how Joe should move diamonds:
Move 1 diamond from a[0] to a[1] -> (a[0]+a[1]) won't change, but (a[1]+a[2]) will increase by 1. So Joe doesn't need to move from a[1], but a[2] to a[3]. And so on ...
0->1 , 2->3 , 4->5, ... , (n-1) -> Joe's pocket.
Joe can get more diamonds unless 1 number in a[0],a[2],a[4],...,a[n-1] = 0.
Could you make the system to where when I get AC the number of problems I solved in the problemset increase by 1 regardless of where I solve it?
Of course, this peter is awesome too... He reminds me of what Petr did in TC when he first entered the website years ago.
GL, HR & HF Everyone!
sorry: he didn't actually won, i should have checked before posting..
Edit: http://www.topcoder.com/tc?module=MemberProfile&cr=22929522 Thats his handle,participated in only one srm.