### fcspartakm's blog

By fcspartakm, 5 years ago, translation, ,

Hello, Codeforces!

I'd like to invite you to Codeforces Round #297 (Div. 2). It'll be held on Thursday, March 26 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 old friends Pavel Kholkin (HolkinPV), Ilya Los (IlyaLos), Vitaliy Kudasov (kuviman) and Arthur Svechnikov (ikar) for writing solutions.

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

UPD The scoring is smooth dynamic (with steps of 250 points). More information about this can be found here. Tasks will be arranged in order of ascending supposed difficulty.

UPD2 Competition completed! Thank you all!

UPD3 You can find editorial here.

UPD4 Congratulations to the winners!

• +175

 » 5 years ago, # |   -171 hello, i have decided that i'll downvote every comment in this post for fun :)
•  » » 5 years ago, # ^ | ← Rev. 2 →   +63 Sure, then everyone who comments in this post will downvote you for fun :))
•  » » » 5 years ago, # ^ | ← Rev. 2 →   -14 downvote Is interesting and helpful for get negative contribution :))
•  » » » » 5 years ago, # ^ |   -12 Everybody wants positive contribution as like as positive rating..but?
•  » » » 5 years ago, # ^ |   -29 I haven't down voted anyone, also, why registration ends in 2 hrs ? :/
•  » » » » 5 years ago, # ^ |   0 You have participated only six contests.But your contribution is already -106.why needs comment here guys?
•  » » 5 years ago, # ^ |   +9
•  » » » 5 years ago, # ^ |   +11
•  » » 5 years ago, # ^ |   0 It' s funny. I wish you get more and more downvote
•  » » 5 years ago, # ^ | ← Rev. 3 →   +12 Blog upvotes: 145. Your comment downvotes: 154. See the diference!
•  » » 5 years ago, # ^ |   +4 Can moderators add an option to disable people from commenting who troll here? I am pretty sure people are here to learn and not to waste time on attention seekers.
•  » » » 5 years ago, # ^ |   -6 Do not be so serious. If there are no fun over here it will be boring.
•  » » » » 5 years ago, # ^ |   +2 I enjoy funny comments as well but let's just agree that this guy's comment is pure crap.
•  » » 5 years ago, # ^ |   0 had you been secretive then you might have had some "fun".
 » 5 years ago, # | ← Rev. 3 →   +7 Your last contest had nice problems.Thank you for creating another contest.
 » 5 years ago, # |   +5 I think you mean "translating into English"? :)As I see that you are from Russia and the google translate of your blog in Russian gives "translating into English" too
•  » » 5 years ago, # ^ |   0 Fixed.
 » 5 years ago, # | ← Rev. 2 →   -74 The comment is hidden because of too negative feedback, click here to view it :))
 » 5 years ago, # | ← Rev. 2 →   -11 It was good
•  » » 5 years ago, # ^ | ← Rev. 2 →   -6 good
•  » » 5 years ago, # ^ | ← Rev. 2 →   +3 good
•  » » 5 years ago, # ^ | ← Rev. 3 →   -7 good
 » 5 years ago, # | ← Rev. 2 →   0 Why does the registration close in less than 2 hours?Edit: Fixed :)
 » 5 years ago, # |   0 :D .
 » 5 years ago, # |   0 So, no dynamic scores system? It was a lot of fun you know, paying attention not only to submit time, but to the overall difficulty of the problem. I've been participating in a such contest as a memeber of an VK-contest team, and I really wanna replay those feelings of knowing not only the solution of the given problem, but also its overall uselessness.
 » 5 years ago, # |   -11 who have same idea with me. "We will up rank tonight" :D
 » 5 years ago, # |   -7 Thanks for the contest . Hopefully it will be a great learning expirience for everybody.
 » 5 years ago, # |   -13 to div1 users: please dont create new accounts :||
•  » » 5 years ago, # ^ |   +7 like you?...you are one of them
 » 5 years ago, # |   0 Scoring distribution?
 » 5 years ago, # |   -25 Codeforces Round #297 (Div. 2) 297 which is divisible by 9; 2+9+7=18=1+8=9 which is also divisible by 9; 2+7=9 && 9 which is also div by 9; Have any problem of divisible by 9? Best of luck.
 » 5 years ago, # |   0 I have a doubt. If 2500 people out of 3000 solve A , 2400 solve B , then how many points will be allocated for A and B (lets assume no of Solutions for C,D,E is < B)
 » 5 years ago, # |   +1 Thanks fcspartakmNice contest :)
 » 5 years ago, # |   +4 The scores of problems was so low that hacking was important than solving problems...Why????!!!??? :(
 » 5 years ago, # |   +1 What is solution to problem C...it seems like simple task but I cannot pass Pretest 4
•  » » 5 years ago, # ^ |   0 Just make right rectangles. The square would be bigger, if the side of rectangle would be bigger. Let's sort them! And after that you can use dinamic programming.
•  » » » 5 years ago, # ^ |   0 Does dp is really needed here? I've solved without it.
•  » » » 5 years ago, # ^ |   +8 No DP is needed. Sort and then traverse backwards.
 » 5 years ago, # |   +6 I had a strange problem during the contest, two times my default compilator changed from GNU C++ to GNU C (and I get two compilation errors :)). Did someone else noticed such thing too?
•  » » 5 years ago, # ^ |   0 I had the same problem.
•  » » 5 years ago, # ^ |   +3 Yes, compilator changed from PyPy 3 to Python 3, but that change got me AC to problem B :) (It was TLE in PyPy, but same code got AC in Python)
•  » » 5 years ago, # ^ |   0 Same here...So will we have -100 because of two compilation errors?
•  » » » 5 years ago, # ^ |   0 No, compilation errors do not count.
•  » » » » 5 years ago, # ^ |   0 Ok, thanks :)
•  » » 5 years ago, # ^ |   +1 Mine changed from GNU C to GNU C++ :)
 » 5 years ago, # |   -15 Great contest! Thank you fcspartakm!
•  » » 5 years ago, # ^ |   -8 multiple account?
•  » » » 5 years ago, # ^ |   0 really??? then Sorry_dreamoon is probably duplicate too...
•  » » » » 5 years ago, # ^ |   0 He is, but not dreamoon's. And I think that M.D perfectly knows the answer to his question but it seems like he wants to be downvoted...
 » 5 years ago, # | ← Rev. 2 →   +3 Could somebody give me a hint of how to approach D and E?Edit: Nevermind, the editorial was posted surprisingly quick.
 » 5 years ago, # |   0 I see the most hacks are in problem B.Can anyone tell us what's the hacking test case ?
•  » » 5 years ago, # ^ |   +1 It was just a big test(maxtest). Some people used std::reverse and the complexity of their codes was O(N^2).
•  » » 5 years ago, # ^ | ← Rev. 2 →   +1 Just TLE. We must not swap symbols in all substrings, because it gives O(n / 2 * m) orepations
•  » » 5 years ago, # ^ | ← Rev. 2 →   +1 Many people did a slow O(NM) solution, reverse all the segments.Of course it's not passing for test case like:aaaaa... 100000 1 1 1 ...
 » 5 years ago, # | ← Rev. 3 →   0 Pff, I'm so sad because I didn't figure out E ... :(Update: Nooo, my C is wrong :( :( :(Those hacks saved my a*s :D
•  » » 5 years ago, # ^ |   0 Same here, my C got pretests wrong, because of integer overflow!So I make up for it with lots of hacks :)
 » 5 years ago, # |   0 Why this test generator is wrong ? the only explanation for that is 1 space in the end of file, because this works well.Why 1 space generates an invalid input?
•  » » 5 years ago, # ^ | ← Rev. 2 →   0 Because it is an invalid input. Somebody may read using fread with a buffer(sometimes I do so) and when you see the size of the buffer, then you can generate a test with a lot of spaces in order to make his/her buffer overflow and hack him/her.
•  » » » 5 years ago, # ^ |   0 O: is clear for me, maybe that is weird for me because that problem never happen using cin :P.Thanks.
 » 5 years ago, # |   +4 Problem C was so ill framed in English :/
 » 5 years ago, # |   0 791 ACs on C. Then why would this problem have 1000 points? Isn't that the general solve count for problem C in a typical CF round? -___-
 » 5 years ago, # | ← Rev. 2 →   +3 WA during the contest : 10474140 AC after the contest with the same code : 10476119 Just put a #include in a comment Any explanation ?
•  » » 5 years ago, # ^ |   0 "Wrong answer on hack 1"Doesn't it mean weak cases?
•  » » » 5 years ago, # ^ |   0 If I was in other room ,the code would have passed system test ! It isn't fair
•  » » » » 5 years ago, # ^ |   0 You mean that the solution didn't even pass the pretests or it passed them and then it was hacked?
•  » » » » » 5 years ago, # ^ |   0 Passed the pretests then it was hacked after that I wrote a new code and got Wrong answer on hack 1, after the contest I re-submitted the same code ( which was getting WA on hack 1 ) and got AC
•  » » 5 years ago, # ^ |   +1 i had the same problem before in another contest, the thing guys told me back then was that limits.h is somehow not supported but i dont know exactly whats wrong...
•  » » » 5 years ago, # ^ |   0 Problem A got accepted and limits.h was included
•  » » » » 5 years ago, # ^ |   0 its strange... i think it would be more useful if you asked this in stackoverflow.com
 » 5 years ago, # |   0 Was the round Unrated? if not, when will the ratings be updated??
•  » » 5 years ago, # ^ |   0 Soon tm
 » 5 years ago, # |   0 in problem C in the test case 4: 8 5 3 3 3 3 4 4 4 how correct ans is 25?
•  » » 5 years ago, # ^ |   0 decrease 5, then construct (4,4,4,4) and (3,3,3,3)
•  » » 5 years ago, # ^ | ← Rev. 2 →   -13 Yes
•  » » » 5 years ago, # ^ |   +1 4*4 + 3 * 3 = 16 + 9 = 25 ...
•  » » » » 5 years ago, # ^ |   -8 I know !
•  » » 5 years ago, # ^ |   0 The five becomes a four and then 4-4-4-4 and 3-3-3-3 are correct rectangles :)
•  » » 5 years ago, # ^ |   0 very poor problem statement ........problem C.
 » 5 years ago, # |   +19 On C it wasn't particularly clear that multiple rectangles are being created... "Ilya decided to make a rectangle from the sticks" implies at least initially that there is only one rectangle. (Or maybe I just need to read more carefully)
•  » » 5 years ago, # ^ |   +12 Agree. Google translate does a better job:"Ilya decided to make rectangles of the sticks."I hope that the translators be more careful about the singular/plurals.
 » 5 years ago, # |   0 D was one of the most interesting problems i have ever seen. Too bad i took wa on #12 :(
 » 5 years ago, # |   +1 Thanks who send to B with O(n^2) complexity
 » 5 years ago, # | ← Rev. 4 →   0 can anyone help me why this solution got WRONG ANSWER http://paste.ubuntu.com/10685457/UPD : it's okay i got it now!!
 » 5 years ago, # |   0 Can anyone tell me why my C solution was skipped whereas the same code got accepted after the contest?
•  » » 5 years ago, # ^ |   +2 You have cheated.
•  » » » 5 years ago, # ^ |   +3 With whom my code has been matched can u tell me??
•  » » » » 5 years ago, # ^ |   0
•  » » » » » 5 years ago, # ^ |   0 thanx dude, there are a lot of cheater out there who keep there eyes on ideone for getting a solution.. n i think he is one of them..
 » 5 years ago, # |   0 Guys, did I solve one or two problems?OneI meant two
 » 5 years ago, # |   +27 I'm afraid to seem impatient but when ratings will update?
 » 5 years ago, # | ← Rev. 2 →   0 http://codeforces.com/contest/525/standings/page/4 uwi's B is still judging, wtf?
•  » » 5 years ago, # ^ |   0 And slycelote's A :D
 » 5 years ago, # |   +5 is the contest unrated??
•  » » 5 years ago, # ^ |   0 No. The ratings have been updated!
 » 5 years ago, # |   +7 Would you mind putting " UPDX Contestants' rate changed" in the end of the post, when new rates apply?
 » 5 years ago, # | ← Rev. 2 →   +6 I'm waiting for ratings...Do they come tonight????
•  » » 5 years ago, # ^ |   0 Every time you kill in a codeforces, raiting takes more time to update :(
•  » » 5 years ago, # ^ |   0 They are updated.
 » 5 years ago, # |   0 I am staying up all night just for looking at the rating update. When will it be updated???
•  » » 5 years ago, # ^ |   0 Now :P
 » 5 years ago, # |   0 I cannot see the problems in the "PROBLEMSET".
•  » » 5 years ago, # ^ |   0 Oh, I find them. But it is very strange that they are not listed in top.
 » 5 years ago, # |   +14 This is the code used in Winner's C: http://codeforces.com/contest/525/submission/10463905 This is the code used in enesoncu's solution to another problem: http://codeforces.com/contest/436/submission/10422970Doesn't it look very similar!
 » 5 years ago, # |   0 all unrated guys have won ,,u know what i mean
 » 5 years ago, # |   0 Can you tell me what is wrong with hacking using generator? I tried three times during this contest, but i have got Validator 'val.exe' returns exit code 3 [FAIL Expected EOLN (stdin)]Probably this is connected with the fact that i have used std::endl? How to do it correctly? Should I use "\n" next time? Because I really could have done at least 2 hacks!Thank you
 » 5 years ago, # |   0 Can you help me?http://codeforces.com/contest/525/hacks/143414/testJudge return this:Validator 'val.exe' returns exit code 3 [FAIL Token parameter [name=s] equals to "/********...correspond to pattern "[a-z]{2,200000}" (stdin)]I couldn't find any problems...
•  » » 5 years ago, # ^ |   0 It seems you've submitted it as a test, not as a test generator
 » 5 years ago, # |   0 Thanks for interesting problems and weak pretests. There were nice opportunities to hack.
 » 5 years ago, # |   0 Could somebody please help me to interpret the following wrong answer on problem D:Test: #12, time: 717 ms., memory: 4404 KB, exit code: 0, checker exit code: 1, verdict: WRONG_ANSWER expected: '***..*......*...****.*****.*.....**.*******.******.*..***.***.**', found: '***..*......*...****.*****.*.....**.*******.******.*..***.***.**'Both strings are identical, but still in some way the validation system seems not to like my string. Thanks in advance.
•  » » 5 years ago, # ^ |   0 Maybe you print '\0' at the end of your answer? :P
•  » » » 5 years ago, # ^ |   0 rather not, as the wrong answer is in test 12 in the 6th word. In such situation all preceding tests should also fail. Thanks anyway. I am really puzzled with this error.
•  » » » » 5 years ago, # ^ |   0 The line is actually 2000 characters long, but Codeforces displays this kind of error like[some prefix]+"..."+[some suffix]Thus, in your error, the "..." unfortunately looks like part of the line. The real error is somewhere in the middle :P
•  » » » » » 5 years ago, # ^ |   0 aha. So in this situation Checker Log is a little bit misleading, as it would suggest that exactly this string (no trailing dots) is incorrect. Please note that the expected and found strings are even in quotes. Checker Log wrong answer 6th words differ - expected: '***..*......*...****.*****.*.....**.*******.******.*..***.***.**', found: '***..*......*...****.*****.*.....**.*******.******.*..***.***.**'Thanks