### fcspartakm's blog

By fcspartakm, 6 years ago, translation,

Hello, Codeforces!

I'd like to invite you to Codeforces Round #288 (Div. 2). It'll be held on Tuesday, January 27 at 19:30 MSK and as usual Div. 1 participants can join out of competition.

Great thanks to Maxim Akhmedov (Zlobober) for helping me preparing the contest, to Maria Belova (Delinur) for translating the statements into English, to Mike Mirzayanov (MikeMirzayanov) for the great Polygon platform and ideas of some problems and to my dear teammates Arthur Svechnikov (ikar) and Ilya Los (IlyaLos) for writing solutions.

The scoring distribution will be announced later. Good luck everyone!

UPD Score system is standart 500-1000-1500-2000-2500.

UPD2 Competition completed! Thank you all!

UPD3 You can find editorial here.

UPD4 Congratulations to the winners!

• +223

 » 6 years ago, # |   +50 Preparing for the battle...
 » 6 years ago, # |   +10 Good Luck to everyone :). I request all Div-1 Participants to participate Out of Competition. Hope I become Div-1 Coder after this Round :).
•  » » 6 years ago, # ^ |   +5 加油~
•  » » 6 years ago, # ^ |   +2 We were roommates today :) Unfortunately you got your C faild :( else you would be there :( Next time :)
•  » » » 6 years ago, # ^ |   0 Congratulations to you for both 1st position in the Room as well as for jumping into Div 1 :).
 » 6 years ago, # |   +67 Two consecutive Div — 2 contest. It's really frustrating for Div — 1 participants.
•  » » 6 years ago, # ^ |   +25 Actually 3, next round is also a Div — 2.. :(
•  » » » 6 years ago, # ^ |   0 I'm curious, how do you know that?
•  » » » » 6 years ago, # ^ |   +3 Codeforces Round #289 (Div. 2, ACM ICPC Rules) — Jan/31/2015 15:00
 » 6 years ago, # |   +34 I remember that I saw Round 288 div.1 && div.2 about 5 days ago. But now there exist only div.2...Could I ask the reason why the div.1 is cancelled? Is it because the problems for div.1 are not prepared?
•  » » 6 years ago, # ^ | ← Rev. 2 →   +7 Here there are some others informations.
 » 6 years ago, # |   +20 Div.1 users dont create new accounts please.
•  » » 6 years ago, # ^ |   0 I think that problem is separate rooms for div 1 users.Many of them want fun,hacking,and best place in their rooms. If that changes,contests would be more regular.
 » 6 years ago, # |   0 gl & hf )) PS: Good luck and have fun) PSS: I have 4 houres before CF. It's about 5 games in Dota 2. GG :D
•  » » 6 years ago, # ^ |   +12 Just try not to break your pc before the contest :D
•  » » » 6 years ago, # ^ |   0 Just try to have good team.
•  » » » » 6 years ago, # ^ |   0 It's for valve to decide :)
•  » » » » » 6 years ago, # ^ |   0 I have a lot of friends, who really can play well)
 » 6 years ago, # |   -9 Although it's a Div.2 only contest, but still it will be a good start for me! I'm sure I'll enjoy the contest!
 » 6 years ago, # |   -8 I hope this won't be dynamic scoring in this contest :|
 » 6 years ago, # | ← Rev. 2 →   +1 cheaters don't cheat!!!!
•  » » 6 years ago, # ^ |   0 and you assume that cheaters will do what you say ? :D
•  » » » 6 years ago, # ^ |   -14 if they cheat i find them :)))
•  » » » » 6 years ago, # ^ |   +6 Have you found yourself yet...
•  » » » » » 6 years ago, # ^ |   -20 Myself or yourself?
 » 6 years ago, # |   0 Update about the scoring system well before contest.. That's unusual.. but nice .. Gl & Hf
 » 6 years ago, # |   +8 let the game begin :)
 » 6 years ago, # | ← Rev. 2 →   0 5300+ participants. That's amazing) UPD: 5400+ :D
•  » » 6 years ago, # ^ |   0 It's a cruel battle. Good luck:)
 » 6 years ago, # |   +16 700+ unrated participants. Funny, isn't it?
 » 6 years ago, # |   +3 What Does standarT in last line Mean Exactly?
•  » » 6 years ago, # ^ |   +3 Try to come up with it :)
•  » » 6 years ago, # ^ |   0 It's a typo. It should be standard which means 500-1000-1500-2000-2500
•  » » 6 years ago, # ^ |   +27 means that problem setter is from Russia. ;)
•  » » 6 years ago, # ^ |   +16 It means the score distribution is a work of art
 » 6 years ago, # |   -9 not to prepare contest is much better than have a contest with many mistakes;
 » 6 years ago, # | ← Rev. 3 →   0 Suspicious?
 » 6 years ago, # | ← Rev. 2 →   +6 dreamoon just might reach his dream of first place in a codeforces round !
•  » » 6 years ago, # ^ |   +3 But he is now 2nd...
 » 6 years ago, # |   0 how to solve E
 » 6 years ago, # |   +1 omg im turnin greeeeeeen!!!!! ;(
 » 6 years ago, # |   +11 How to solve D?
•  » » 6 years ago, # ^ |   +2 I have an idea that "ABC" is actually an edge between "AB" and "BC". What we need to do is to find an Eulerian trail of the induced directed graph.(Yeah, I failed in the second part)
•  » » » 6 years ago, # ^ | ← Rev. 2 →   0 Looks correct. Why I didn't come up with this idea at the first place?!
•  » » 6 years ago, # ^ |   0 Let's look on the graph in which each vertex is a pair of symbols. Then for example abc = ab -> bc. The answer is the euler path in such graph.
•  » » 6 years ago, # ^ |   0 Imagine a graph with 52 * 52 nodes. Each node represents a string like this "ab".Then each sub string means edge in this graph. Find Euler path.
•  » » » 6 years ago, # ^ |   0 even more digits are also allowed .. I have not noticed this thing and start coding and later realised that this solution is of no use now ..
•  » » » » 6 years ago, # ^ | ← Rev. 2 →   0 I did not noticed digits. It would be nice if they were bold :(.Thank you, for pointing out my bug during contest.
•  » » » 6 years ago, # ^ |   +3 62 * 62 nodes...
 » 6 years ago, # | ← Rev. 2 →   0 Can someone tell me what's wrong with my solution here? for problem E? I used an O(n^2) method, but I still get TLE .-.
•  » » 6 years ago, # ^ |   0 I think, it's not O(n^2). Try test: 1 10000 1 10000 1 10000 ... 1 10000 2 10000
•  » » » 6 years ago, # ^ |   0 Wait; I was talking about problem E. That isn't a valid test.
•  » » » » 6 years ago, # ^ | ← Rev. 2 →   +3 Sorry. I mean:6001 11991 1199... many time 1 11991 11992 1199
 » 6 years ago, # |   0 B is gonna have so many System Testing wrong answers :3
 » 6 years ago, # |   0 It was very fun contest :DI wonder how can solve C...
•  » » 6 years ago, # ^ |   0 Hello mhkim4886C can be solved using this idea that the candles required at the ith second can be burnt at i-1 , i-2 ,,, and so on second .. but after burning these candles check once whether you have achieved required number of candles or not .
 » 6 years ago, # |   0 I don't understand why this code couldn't pass the first pretest case about problem D, I did Eulerian Cycle and I got the same output in every pretest case, but I got WA in pretest one :Ssss >< http://ideone.com/1RfNzu
•  » » 6 years ago, # ^ |   0 Use custom invocation in situations where your code does not pass test 1. Your code prints "NO" on CF servers.
•  » » » 6 years ago, # ^ |   0 but what is the problem with my code?? :S
•  » » » » 6 years ago, # ^ | ← Rev. 3 →   0 When I tried my code in ideone this one prints "YES" :S....., somebody?
•  » » » » 6 years ago, # ^ |   +6 Looks like you do not assign the "comp" variable, which is local. Should be: int ip = 0, comp = 0, ini;
•  » » » » » 6 years ago, # ^ |   0 Finally I got AC, O(E) in memory instead O(V^2), my complexity is O(V + E), this was the first time i need to erase edges in O(1).I didn't use adjacency list, just arrays, but this guy did ithttp://codeforces.com/contest/508/submission/9595512
 » 6 years ago, # |   0 I solved A but couldn't submit...
 » 6 years ago, # | ← Rev. 3 →   +21 My first hack in codeforces is unsuccessful :P
 » 6 years ago, # |   +10 Gray has been my favorite color.....since I started here ^_Q
•  » » 6 years ago, # ^ |   0 It was my favourite too.
 » 6 years ago, # |   0 D was a very interesting problem; can someone give the algorithm?
•  » » 6 years ago, # ^ | ← Rev. 2 →   +8 Interpret as a graph from the first two characters to the last two characters of each substring, and find an Eulerian path.Find Eulerian path with something like Hierholzer's algorithm.
 » 6 years ago, # |   -35 Just for fun !
•  » » 6 years ago, # ^ |   +12 What's wrong with that? Take care of your own submissions, boy.
 » 6 years ago, # |   +12 Thanks for realy funny contest, with string problems! :) . And thanks for weak pretests! In problem B I've found some too slow submissions in my room, so need to generate maxtest for these submissions.
 » 6 years ago, # |   0 pending system testing 10 minutes @@
 » 6 years ago, # |   0 I submitted C in the last minute and didn't even get time for checking my A. After reading the editorial I found out what a foolish thing I did with A just because I thought I had to solve 3 this time.
•  » » 6 years ago, # ^ |   0 where is the editorial? thx!
•  » » » 6 years ago, # ^ |   0
 » 6 years ago, # |   -11 didn't ever seen a problem 0.5 second!!! time limit during any contest!!! why so strict time limit is it a problem with only one solution, and any other solution would fail?!
•  » » 6 years ago, # ^ |   0 i believe this was done to avoid bruteforce solutions that try to compare every possible swap and output the best one. When it also can be done greedily.
•  » » 6 years ago, # ^ |   -12 didn't use anything but swap and time limit!!!!!!!????
•  » » » 6 years ago, # ^ |   +14 Your solution is O(N2) because of string comparison. Calm down.
•  » » » 6 years ago, # ^ |   0 I tried the very same thing as you but I got TLE in pretest 10, so i resubmitted with a greedy approach. Trying to generate the solutions with swap on a string seems to be too slow.
•  » » » » 6 years ago, # ^ |   0 i think it's luck that my solution passed pretest 10 and didn't think about the greedy one xd
•  » » » » » 6 years ago, # ^ |   0 It's not :) If it got wrong answer, you could think of another solution and accept the code for real this time. Of course, it's good for the hackers, though :)
•  » » » » » » 6 years ago, # ^ |   0 of course it isn't i meant bad luck xD
•  » » 6 years ago, # ^ |   0 The only one solution is very very fast than other ways.
 » 6 years ago, # |   0 Is it unrated contest??!!! I am in place 700 and still gray... hooooow!
•  » » 6 years ago, # ^ |   0 No, it's only unrated for Div1 participants. You will be rated.
•  » » » 6 years ago, # ^ |   +1 thanks so much Olaf :)
 » 6 years ago, # |   +5 http://cfa.yuldashev.net/contest/508Humble reminder in case if you missed the post
 » 6 years ago, # |   0 Very strange: during the round I was hacked by Nuta. She solved all the problems and was on the 2nd place before the end. But now she's out of scoreboard, her submissions are not listed in the room o_O Furthermore, her last rated round (before today) is not included in the graph. Weird %)
•  » » 6 years ago, # ^ |   0 Yeah, I saw him but he is gone now...
•  » » 6 years ago, # ^ |   +3 Dear Nuta,:O
 » 6 years ago, # |   +9 It may sound stupid, or rude, but I would please all the Div.2 / Div. 1+2 setters to announce the winners. I mean, especially for Div.2 contestants, who, some of them will never reach top 5 in a Div.1, it really makes them happy to see their names on the round post, and I consider it to be a nice thing. However, one will do as he wants, it was just an advice. :)
•  » » 6 years ago, # ^ |   +6 I guess that the fact that Div 2 winners have been "newcomers" most of the time likely discourages writers from putting such thing in their posts.
•  » » » 6 years ago, # ^ |   0 Hmm yes, this is a bit sad... But still, there is always at least one person in the top 5 wo isn't a newcommer.
•  » » 6 years ago, # ^ |   +9 done
•  » » » 6 years ago, # ^ |   +1 Didn't expect that to happen! Thank you, sir!
•  » » » 6 years ago, # ^ |   0 What has happened to this participant? http://codeforces.ru/submissions/Nuta She's sent submissions to all problems during the round, and was at top-2. But right after the end she got out of rating.
 » 6 years ago, # |   +3 Why doesn't stoi() work on CodeForces? (C++11)
•  » » 6 years ago, # ^ |   0 agree, as well as to_string()
 » 6 years ago, # |   0 Can someone explain to me what could be so special about test case #40 for problem A. I tried to hack this solution during the contest: http://codeforces.com/contest/508/submission/9582562. I expected that if I had some moves 1000 1000, it would lead to RTE (as it must throw a segmentation fault) . But, my hack was unsuccessful.I tried this test case: 1000 1000 4 1000 1000 1000 999 999 1000 999 999Why did it fail to produce a RTE veredict?
•  » » 6 years ago, # ^ |   +6 Array out of bound errors on C++ is undefined behaviour. It's usually impossible to know what the program will do in these cases.
•  » » » 6 years ago, # ^ |   0 Thanks, I will keep this in mind before trying to hack again :)
•  » » 6 years ago, # ^ |   0 This hack would work: 1000 1000 1000 1000 1 1000 2 1000 3 ... 1000 1000 
 » 6 years ago, # |   0 Dang! I didn't check the time limit on problem B. My bruteforce solution got TLE :( I'd better check the time limit on each problem next time.
 » 6 years ago, # |   0 Does "Tanya" in your problems has the the same meaning as "Tanya" in I_love_Tanya_Romanova?
 » 6 years ago, # |   0 I am sad that my C(with set-stl),got TLE,but I am happy I became blue :D. That was my first goal,now it is division 1. I say that just because,I want grey and green users to know,that with 'correct' practise we can do everything :D
 » 6 years ago, # |   0 Div.2 Problem A: Here is my submission. WA on test 5 but it is too big. Can anyone help me with it please?