### fcspartakm's blog

By fcspartakm, history, 6 years ago, translation,

Hello, Codeforces!

I'd like to invite you to Codeforces Round #322 (Div. 2). It'll be held on Monday, September 28 at 12:00 MSK and as usual Div. 1 participants can join out of competition. Note that round starts in the unusual time!

This round is held on the tasks of the school stage All-Russian Olympiad of Informatics 2015/2016 year in city Saratov. They were prepared by me and recently returned from army Edvard Davtyan (Edvard).

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 Vladimir Petrov (vovuh) for writing solutions.

It will be a little unusual round — you will be given six problems and two hours to solve them. The scoring distribution will be announced later. Good luck everyone!

UPD The scoring distribution today will be 500-1000-1500-2000-3000-3000.

UPD2 Editorial

UPD3 Congratulations to the winners!

• +163

 » 6 years ago, # | ← Rev. 3 →   -19 I think it'll be exciting to have one division combined contest per month.Is it possible?
•  » » 6 years ago, # ^ |   +78 Sure, you just have to provide problems for it.
 » 6 years ago, # |   +4 That doesn't seem correct... Also, the actual time seems to be just 2 hours before SRM 669...
•  » » 6 years ago, # ^ |   +9 Fixed.
 » 6 years ago, # |   +8 Auto comment: topic has been updated by fcspartakm (previous revision, new revision, compare).
 » 6 years ago, # |   +2 Can you move it to Sunday afternoon please ? It is hard not just for me,but for many users to adapt to this unusual contest time...
 » 6 years ago, # |   +11 4 AM in my part of the US o.O. At least I can participate.
 » 6 years ago, # |   0 It's in my school time :( !OK i will take it virtual!
 » 6 years ago, # |   -35 Why not just move the contest to Sunday at the usual time? This suspicious time seems like a move to try to "steal" contestants from Topcoder.
•  » » 6 years ago, # ^ |   +37 The competition is held parallel to the school competition, so the time is unusual.
•  » » » 6 years ago, # ^ |   +26 What about moving your contest 15 minutes earlier? It's not a big change, but enough for a rest between CF round and SRM :D
•  » » » » 6 years ago, # ^ |   0 same problem! but I love the challenge :D!!
 » 6 years ago, # |   +26 What a perfect time for coders in East Asia! ( 5PM ~ 7PM )
•  » » 6 years ago, # ^ |   +1 nice idea :)
 » 6 years ago, # |   +3 my school finish when contest is finished... :(
•  » » 6 years ago, # ^ |   -7 but my school finish when contest s finished.... :(
 » 6 years ago, # |   +5 six problems and two hours ? Note that round starts in the unusual time ? OMG very unusual contest :)
•  » » 6 years ago, # ^ |   -26 wtf?
 » 6 years ago, # |   0 QWQ 17:00 is good time ,but I have a class on Monday
•  » » 6 years ago, # ^ |   -27 you really that 17:00 is good time for you?
 » 6 years ago, # |   -21 Can you add one problem and make it rated for both Div 1 & 2 :)
•  » » 6 years ago, # ^ |   -26 woooow nice idea
 » 6 years ago, # |   +48 So I'm gonna skip school for this contest. Yay!
•  » » 6 years ago, # ^ |   -29 bad boy :)
•  » » 6 years ago, # ^ | ← Rev. 2 →   0 i also skip my 'Chemistry'lesson beacuse of contest
 » 6 years ago, # |   -12 We look forward to the classic problem of the Army. Good luck to all!
•  » » 6 years ago, # ^ |   -28 really?
 » 6 years ago, # |   -19 6 problems in 2hrs. Imagining how easy/hard the problems will be. I have a hunch most Div2 will solve the C problem. The decider for remarkable rating changes might just be the D.
•  » » 6 years ago, # ^ |   +2 You can't predict it at all.. everything is possible in such competitive activities my dear :)
•  » » » 6 years ago, # ^ |   0 I am by no means trying to predict anything!!! Its a hunch (a feeling or guess). I don't see how your comment is helpful to me though; maybe its for upvotes or something else.
•  » » » » 6 years ago, # ^ |   0 You must have misunderstood me.
•  » » 6 years ago, # ^ |   -55 You can downvote all you want. You're basically wasting your time. :D
•  » » » 6 years ago, # ^ |   +5 See more on KnowYourMeme!
•  » » 6 years ago, # ^ |   -43 Nothing has since changed in my life since the downvotes...well aside that am a few dollars richer. So keep up the downvotes and waste your precious time. :D :D :D
•  » » » 6 years ago, # ^ |   +20 I don't understand how that could waste our time!? it literally takes one second to downvote a comment. :/
•  » » » » 6 years ago, # ^ |   -17 I actually don't expect you to understand how it would waste your time.
•  » » » » » 6 years ago, # ^ |   0 Just like you vote for political parties to form your government(if there's democracy in your country) to show whether you like them or not, you upvote/downvote without caring about the time you waste.
 » 6 years ago, # |   +2 I wish the scoring will be IOI styled.
•  » » 6 years ago, # ^ | ← Rev. 3 →   +2 I wish that too. I also wonder how's it 6 tasks for 2 hours, and Div. 2 contest. I thought the school stage of the Russian Olympiad would contain less but very hard problems. Let's hope for the problems to be useful for practicing by Olympiad participants! :D
 » 6 years ago, # |   +18 Please test the system before starting time because SRM will begin after this contest directly
 » 6 years ago, # |   +7 Is hacking allowed in this round? Since it is an unusual and parallel round, the confusion arises!
•  » » 6 years ago, # ^ |   +10 Yes.
 » 6 years ago, # |   +4 very unusual contest ,i hope it has usual but interesting problems
 » 6 years ago, # |   -14 Nooooooooo!! It had to happen just when my rating starts to rise a bit , Guess I've gotta wait for the next contest . Anyway I wish "ALL THE BEST" for those of you who participate .
•  » » 6 years ago, # ^ | ← Rev. 2 →   +8 Each contest you miss is your loss. Forget ratings. Ratings will rise when you become good and you can't become good by avoiding intimidating situations. I know this because I used to avoid contests too :)
•  » » » 6 years ago, # ^ |   0 Dude I cant miss my lab's either now , can I.....!! And what made you think that I was Avoiding It , when I was feeling bad that I wouldn't be participating in it....??I_love_Captain_America.
 » 6 years ago, # |   0 why this time??
 » 6 years ago, # |   +25 Please CF be careful, any delays on this round will case it's intersection with TC round
 » 6 years ago, # |   -9 12.00 Slightly unconvenient time for Ukraine.
 » 6 years ago, # |   +1 Should we wait a long time for system testing and rating changes? I mean, maybe real competition won't finish at time we finish?
 » 6 years ago, # |   0 I really don't like the idea, that codeforces round finishes in the same moment when topcoder srm starts!Does anyone know the way to influence topcoder administration?
 » 6 years ago, # |   -6 I still need to practice for this.
 » 6 years ago, # |   -7 Why set a round in the unusual time? or Which case will lead a round in unusual time?
•  » » 6 years ago, # ^ |   +6 because it's something like mirror of school Olympiad, as far as I unserstood
 » 6 years ago, # |   0 Good luck everyone. I will do this contest at lunch break @ work! :)
 » 6 years ago, # |   +30 100 bonus points to whoever wrote the ugliest solution to problem D?
•  » » 6 years ago, # ^ | ← Rev. 2 →   +11 http://ideone.com/exrBGb and even then failed the system tests :(
•  » » » 6 years ago, # ^ |   0 968 lines!!
•  » » » 6 years ago, # ^ |   +17 Absolute winner!!!!
•  » » » 6 years ago, # ^ |   0 I can't even ...
•  » » » 6 years ago, # ^ |   0 holy
•  » » » » 6 years ago, # ^ |   0 mother of jesus christ!!!
 » 6 years ago, # |   +2 Problem D was just horrible! (and to be serious it was a very good one :-) What is an elegant solution to this?
•  » » 6 years ago, # ^ |   0 +1
•  » » 6 years ago, # ^ |   0 It has too many conditions to handle. Curious to see if there's a recursive solution to it. I wrote a big messy solution , will submit it after system tests.
•  » » 6 years ago, # ^ |   +1 I doubt if there exists any elegant solution rather than dealing with each case possibly . However, it will be very nice if some red guy explains how they generally deal with these kinds of problems (don't they get irritated).
•  » » » 6 years ago, # ^ |   0 of course there is only two cases ! and these two cases are the ones in samples also it's easy to proof that only these cases might be correct ! check my solution : https://ideone.com/HomOtB
•  » » 6 years ago, # ^ |   +1 I used the following observation that there will always be atleast one rectange out of a, b & c whose one side will be equal to the side of the new square. It helped me a lot in concise my code.
•  » » » 6 years ago, # ^ |   0 Did this observation reduce your code length, or simply increase the number of conditions? The brute force way is a huge code, but at least its a complete copy paste work.
•  » » » » 6 years ago, # ^ | ← Rev. 2 →   0 There are only 2 conditions: 0 1 2 and 0 0 1 2 If we'll Brute all pertumations Try to rotate each rectangle My submission: 13269637
•  » » » » » 6 years ago, # ^ |   0 Yours is neater than mine, and shorter.
•  » » 6 years ago, # ^ |   +1 I wrote solution, using straight forward idea:1) try all 6 possible permutaions (3! = 6, 6 times call first function)2) try all 8 possible swap's x and y (2 ** 3 = 8, 8 times call second functionNow you need to check only 2 possible answers.Solution: 13270215
•  » » » 6 years ago, # ^ |   0 Can you explain why we need to take every permutation of the initial order? A counter-example would be perfect.
•  » » » » 6 years ago, # ^ |   0 Try switching around the letters in the second example test and you will get different cases but if you take all permutations (or sort them like I did) it's only one case.
 » 6 years ago, # |   0 Can anyone tell me why my code gives me (and everywhere I checked ) right answer but gives wrong on system test? my solution: 13269100
•  » » 6 years ago, # ^ | ← Rev. 4 →   0 I'm not sure is it the case, but (int)floor((double)skill[i].rat/10.0) extremely inaccurate and is equal to skill[i].rat / 10 (if skill[i].rat is an integer variable) which is 100% accurate.
 » 6 years ago, # |   +20 Unable to submit in practice mode. Please check.
•  » » 6 years ago, # ^ |   +15 The problems will be available after our onsite event completely ends. It seems it will be in 1 hour.
 » 6 years ago, # |   0 Good round: good problems, fast system test, fast editorial. Problem F was very nice. Did anyone solved it in a different way to the editorial ?
 » 6 years ago, # |   0 I am not able to understand the solution presented in the editorial for the problem F. Can anybody explain me solution for problem F in a bit detail ?
 » 6 years ago, # |   +6 new record :D 11 on div2 and new max
 » 6 years ago, # | ← Rev. 2 →   0 i wonder when i can re-submit some problem in this contest?
•  » » 6 years ago, # ^ |   +4 See MikeMirzayanov's comment :)
 » 6 years ago, # |   +3 Problems were very interesting. so good... thanks for making this contest!!!
 » 6 years ago, # | ← Rev. 2 →   +3 During contest I submitted a code , it passed pretest but got wa in system test .... now same code I submitted later and got accepted ..... what seems to be the problem here ...... :/ ....code which got wa:http://codeforces.com/contest/581/submission/13270251same code which got ac later:http://codeforces.com/contest/581/submission/13276903
•  » » 6 years ago, # ^ | ← Rev. 2 →   +1 Well. The problem is in this for:for(int i = 0; (i < n) || (k > 0); i++)When k is big, i becomes much more then n, so your progmam crashes and don't write anything (and get wa because of unexpected end of file). For example in test like: n = 10^5, k = 10^7, a[i] = 100. I have no idea why it's passing tests now, but this is it.P.S. Sorry for english.
•  » » » 6 years ago, # ^ |   0 Maybe it's features of codeforces, so after contest there is no problem with array index out of bounds.
•  » » » » 6 years ago, # ^ |   0 If you increase the size of the array, the program works correctly.
•  » » » » » 6 years ago, # ^ |   0 hey thanks for taking your time and giving me replies :) ..... yes, it was a mistake.... and it's weird that it got accepted afterwards .....
•  » » » » » » 6 years ago, # ^ |   0 good evening