### Gerald's blog

By Gerald, 8 years ago, translation,

Good Day!

Coder-Strike 2014: Round 1 will start very soon. If you want to participate, please register for the contest on page. The round was prepared by me, HolkinPV and Igor_Kudryashov. And we tried our best to make it really awesome.

The round will be usual rated round for the second division participants. The first division participants can take part too, but for them the round will be unrated.

Hope you enjoy the problems! Good luck!

UPD 1. Score distribution will be standard: 500-1000-1500-2000-2500.

UPD 2. The competition was delayed by 10 minutes. :]

UPD 3. Because of unusual room assignment Div.1 and Div.2 participants will be in the same rooms this round.

UPD 4. The contest has ended, hope you like the problems. Rating for Div.2 participants will be updated a bit later.

Announcement of Coder-Strike 2014 - Round 1

• +61

 » 8 years ago, # |   +1 Is contest like another contests at Codeforces? 5 problems, hacking and ... ?
•  » » 8 years ago, # ^ |   +3 "The round will be usual rated round for the second division participants." ..so i think yes :D
•  » » » 8 years ago, # ^ |   0 Yep, you're right! :]
•  » » » » 8 years ago, # ^ |   0 Really easy contest... That was just about speed... And it didnt need neither programming skills nor theory knowledge (Except problem D)...
 » 8 years ago, # | ← Rev. 2 →   0 Why it's not rated for Div1 contestants?Edit: Just noticed that it's a tournament for high school students.
•  » » 8 years ago, # ^ |   0 I think it is because this round is too easy for div1 coder... just like the div2 only contest
 » 8 years ago, # |   0 And what about round 2 ?! rated for Div1 users or not ?!
•  » » 8 years ago, # ^ |   0 I cannot tell you such an information right now for sure. Now I think that it will be rated for div1 participants with very low probability.
 » 8 years ago, # | ← Rev. 2 →   +3 As you know, one thing included in rating calculation is rank. In this round div1 and div2 compete together. The whole rank will be included for rating, or div2's separate rank will be included? If we register in this round and we don't submit any code, will our rate decrease? I hope you understood my questions! :D
•  » » 8 years ago, # ^ |   +7 Div.1 users can take part unofficially and they will not be rated. For official participiants and unofficial Div2 users rating calculation will be separated.
•  » » » 8 years ago, # ^ |   +8 I see. Div1 users will have no part in others rating. They just compete unofficially. Thanks
•  » » » » 8 years ago, # ^ |   +1 Also, if you submit nothing, you will not be in the standings and your rating will not change (also, your position will not affect anyone else's rating).And div1-participants are in different rooms than the div2 ones, so that they can hack only other div1-participants.
•  » » » » » 8 years ago, # ^ |   0 very nice :D
•  » » » » » 8 years ago, # ^ |   +1 users who submit nothing don't even affect rating of participants with negative score in final standings?
•  » » » » » » 8 years ago, # ^ |   0 Yes. They are not in the standings.
•  » » » » » 8 years ago, # ^ |   0 hahaa see UPD 3 :P
 » 8 years ago, # |   +8 I have a more general question. What happens if we register for a contest and because of a bad happening (such as losing internet connection or ...) we won't submit any code? Will our rate decrease or it will be same as before?
•  » » 8 years ago, # ^ | ← Rev. 2 →   +14 Your rate will be changed only if you make at least one submission in the contest
•  » » » 8 years ago, # ^ |   +4 Thanks
 » 8 years ago, # |   +3 It only rate the schoolchildren in Moscow region, right? I was register and I saw "out of competition"
•  » » 8 years ago, # ^ |   +6 The round will be usual rated round for the second division participants.
 » 8 years ago, # |   +4 how long will it last?
•  » » 8 years ago, # ^ |   +3 2 hours, as usual.
 » 8 years ago, # |   +21 Again delay..
•  » » 8 years ago, # ^ |   0 Nice Start!
•  » » 8 years ago, # ^ |   +9 First Time to see delay without any problems appears to us
•  » » » 8 years ago, # ^ |   +10 Once the reason was, that official participants were having dinner that time :)
•  » » » » 8 years ago, # ^ |   +7 At the end of the day, what's more important than dinner?
•  » » » » » 8 years ago, # ^ |   0 Nothing :)
 » 8 years ago, # |   0 Oh~delay ten minutes. Is it because of the server?
•  » » 8 years ago, # ^ |   +1 No Error appear it seems like system used to make a 10 min delay even if no problem appear
•  » » » 8 years ago, # ^ |   +3 This 10 minute delay is happening for every round! They should set a default 10 min delay :D
•  » » » » 8 years ago, # ^ |   +1 if that happens, then rounds will get delayed by 20 minutes! :D actually they should set a default advancement of 10 minutes, so that the round will start at regular time! :)
•  » » 8 years ago, # ^ |   +19 No, it is just to give some additional time for official participants.
•  » » » 8 years ago, # ^ |   0 OK...just wait for it~GL&&HF
•  » » 8 years ago, # ^ |   +1 I think it is because of a technical reason: Some people are having dinner :))
•  » » » 8 years ago, # ^ |   +9 so please I need also 10 min extra to have a dinner :)
•  » » » 8 years ago, # ^ |   0 No, i was late :)
 » 8 years ago, # |   0 First time div1 and div2 participants will be in same rooms! Looks very interesting! :)
 » 8 years ago, # |   +1 Total: 2279 Contestants: 103 Out of competition: 2176
 » 8 years ago, # |   +1 Can non russian participants win a t-shirt?
•  » » 8 years ago, # ^ |   0 no
 » 8 years ago, # |   0 How will div2 users be rated? The ranking is not separated. Will the mixed rank be putted in the rate calculation formula or first you will separate the ranks of two divisions and then you will calculate according to the new separated ranks?
 » 8 years ago, # | ← Rev. 2 →   +21 D = EE = D
•  » » 8 years ago, # ^ |   0 I hope implementations still have some difference.
•  » » 8 years ago, # ^ |   0 swap(D,E);
•  » » 8 years ago, # ^ |   0 Should have waited for the system tests. Although D did look more difficult.
•  » » 8 years ago, # ^ | ← Rev. 2 →   +11 actually, problem D has a very simple solution (6412648)! unfortunately i could only get it after the contest finished. :/EDIT: DemoVersion's explanation about why this approach works.
 » 8 years ago, # |   +4 What was the indended solution for D? I thought about some bipartite matching, but the number of edges was too high. I suppose that either this or a constructive solution should apply. Is anybody available to give a little hint? (Don't spoil it yet).
•  » » 8 years ago, # ^ | ← Rev. 4 →   +5 Topsort passed pretests.UPD: it passed full-tests.
•  » » 8 years ago, # ^ |   +4 This passes pretests : reverse the edges, then find topological sort of this new graph, and output it in reverse order.
•  » » » 8 years ago, # ^ |   +7 But how is one able to topsort a graph which is not guaranteed to be a DAG? I suppose there is a slick trick involved in here. Am I right?
•  » » 8 years ago, # ^ |   +3 topological sort
•  » » 8 years ago, # ^ |   +3 Some Hint:Before we let an employee in, we let all of persons he owes money in then there will be no error ;)
•  » » » 8 years ago, # ^ |   +6 but how this is possible for cyclic graphs (second example)?
•  » » » » 8 years ago, # ^ |   +5 Yes its error but your attempting to hack my hint ?! :D he should figure out that himself.
•  » » » » » 8 years ago, # ^ |   +6 At least for every hint given by now, I took the second exemple from the statement (the length 3 cycle) and said: how can one use such logic on non DAG graphs? (Also mentioned this in my second post up here). Did this approaches also pass SysTests?
•  » » » » » » 8 years ago, # ^ |   +11 My version: it is possible to remove some edge from the cycle without loss for the final structure. So we made DAG.
•  » » » » » » 8 years ago, # ^ | ← Rev. 2 →   +9 My code Passed 6412544There can not be a cycle with 2 node ( Two persons cant both owe each other ).For cycles with more than 2 node its ok we can write the reverse cycle starts from anywhere.Ex for test2 lets start from node 1 employe than 1 owes is 2 employe than 2 owes is 3 employe than 3 owes is 1 ( but we visit that so we step back) print 3 print 2 print 1 Thats one of answers. The solution i used at contest was based on the Topological Sort 6407870 but this one was easier to get.
 » 8 years ago, # | ← Rev. 5 →   +3 hacking errorWhat type of error it is?I am not able to post the image so I posted the link.
•  » » 8 years ago, # ^ | ← Rev. 2 →   0 someone made a test, your program was unable to pass//link does not work
•  » » » 8 years ago, # ^ |   0 I used input as file , and it was not hacked by others too.
•  » » 8 years ago, # ^ |   0 UPD :I corrected the link
•  » » 8 years ago, # ^ | ← Rev. 2 →   +3 i think it means that when u submitted the hack, another hack was already submitted and in queue before urs. so by the time ur hack was "popped" from queue, the solution was already hacked, therefore ur hack was discarded.EDIT: however, it looks like u have got points for successful hack of his solution 6409307! not really sure what happened here!
•  » » » 8 years ago, # ^ |   0 Thanks for answer.I thought the same.So I checked my room and refresh the site again and again but found that it is showing as correct solution.UPD : My point has been updated after the contest, they gave me it as successful hack.
 » 8 years ago, # |   0 Is the contest rated for div2 contestant ???
•  » » 8 years ago, # ^ |   0 yes
•  » » » 8 years ago, # ^ |   0 Thank you :D
 » 8 years ago, # |   0 Is it possible to solve E using RE?
•  » » 8 years ago, # ^ |   0 RE?
•  » » » 8 years ago, # ^ |   0
•  » » » » 8 years ago, # ^ |   0 Oh ok.
•  » » 8 years ago, # ^ |   0 I tried very slow RE, so TLE...
 » 8 years ago, # |   0 When will the system testing take place?
 » 8 years ago, # |   0 How many rounds of Coder-Strike 2014 will there be?
 » 8 years ago, # |   0 the ranks of div 2 participants depending on div 1 participants or not ?
•  » » 8 years ago, # ^ |   +2 Since the contest is only rated for div2, it's only logical that ratings of div1 participants wouldn't affect that of div2 ratings. Although I'm not sure.
•  » » » 8 years ago, # ^ |   0 I hope they will judge logically.
•  » » » 8 years ago, # ^ |   0 I also think so... :)
•  » » » 8 years ago, # ^ |   0 Yeah, this is what they just did, but since new rating depend of the rank and the expected rank, compete with div1 can only be good for us ;)
 » 8 years ago, # |   +10 6407031 6407103 i honestly dont know why users try to cheat even in unofficial contests!! -_-
•  » » 8 years ago, # ^ |   0 How do you find same solutions?
•  » » » 8 years ago, # ^ | ← Rev. 2 →   0 i hacked one of them, and just ran into the other while checking some Failed System Test solutions. i recognized immediately when i saw n - (k+2) (i hacked first submission on same mistake).
•  » » » » 8 years ago, # ^ |   0 Thanks for the explanation
•  » » 8 years ago, # ^ |   +5 Or this one 6411312 6406588
•  » » » 8 years ago, # ^ | ← Rev. 2 →   0 His solution was hacked because he wrote stupid "if" in code. ;)Sorry for my bad English.
•  » » » » 8 years ago, # ^ |   +9 but he wrote that purposefully to hack his "fake" account! look at the handles it is clear that one person use both accounts!!
•  » » » » » 8 years ago, # ^ | ← Rev. 2 →   0 Oh, I didn't noticed that. Then he had cheated.____________________________________________ Sorry for my bad English.
•  » » » 8 years ago, # ^ |   +3 Sorry for minus in contribution, didn't notice the difference between their handles :(
•  » » 8 years ago, # ^ |   +3 They are out-of-competition here because only Russian high school students are official competitors, but these guys (guy?) still get rated.
•  » » » 8 years ago, # ^ |   0 Because this contest was rated for div-2 participants
 » 8 years ago, # |   0 can someone explain why no test case with output -1 was included for problem D?is an output of -1 impossible to get and if that's the case why? Thanks.
•  » » 8 years ago, # ^ |   0 yes, answer of -1 is impossible.
 » 8 years ago, # |   +4 When rating of Div 2 participants will be updated ?
•  » » 8 years ago, # ^ | ← Rev. 3 →   0 Still not updated :/ UPD: it has been updated
 » 8 years ago, # |   +21 oh my god, tourist use 23min to solve all the problems....
•  » » 8 years ago, # ^ |   +14 too long?
•  » » » 8 years ago, # ^ |   +24 it's not enough for me to even read all the problems ...
•  » » » » 8 years ago, # ^ |   +12 First Note that he read problems in Russian his native language. Second almost he write solution while reading the problems. Third he is very fast in writing. Forth if you used all previous features you will solve problem "E" in 23 min. so you need a core I_7 mind to solve all of them in 23 min.
 » 8 years ago, # |   0 Is there any editorial for this contest. Or can anybody who solved Problem D and E kindly explain the approach for solving those ?
•  » » 8 years ago, # ^ |   0 editorial is here. for D, there is a much easier way than editorial. explanation is here.
 » 8 years ago, # |   0 Can anyone help me with E??? It seemed not very difficult but both during the contest and after that I'm getting WA on test 13. It is a very long string and as a result I don't understand where I went wrong in my code. A very short hack would be appreciated. Thanks.
•  » » 8 years ago, # ^ | ← Rev. 2 →   +4 ab@@c.com Answer : 0 failed at testcase 26 during contest due to this bug, there's probably more bug in your code
•  » » » 8 years ago, # ^ |   0 Thanks a lot. Solved cases similar to that and know I'm getting WA on test 23!!! It's driving me crazy!!! I'd appreciate it if you take another look at my code. Thanks.
•  » » » » 8 years ago, # ^ | ← Rev. 5 →   +1 @a_1a@_.a Answer : 0 
•  » » » » 8 years ago, # ^ |   +2 The substring between @ and . should be a non empty substring consisting only of letters and numbers.Your code check only one occurrence of _ after the first letter.So in a case like : a_@b_.c ... Your code count the substring b_ as a valid substring between @ and . ... while it is not !
•  » » » » 8 years ago, # ^ | ← Rev. 2 →   0 Thanks both of you: zeulb and YellowNextYear. I noticed this condition but implemented it in my code wrongly.