### PavelKunyavskiy's blog

By PavelKunyavskiy, 10 years ago, translation,

Hello!

We are happy to invite you to participate in today's round. I hope everyone will find interesting problems for him. And most of the round participants will like it as well as the previous one.

Today's contest was prepared for you by SPb SU 4 team (Alex-Gran (Alexandr Granovskiy), Dmitry_Egorov (Dmitry Egorov), PavelKunyavskiy (Pavel Kunyavskiy)). After long thoughts you can notice that we present St.Petersburg State University.

Thanks very much for help in the tasks preparation to Artem Rakhov(RAD), Gerald Agapov (Gerald) and Maria Belova (Delinur) for translation statements. Also thanks to Petr Kalinin (KAP) for statements proofreading.

In today's contest there will be seven problems (5 in each division) about the country where wizards live, and this causes many interesting events. Today you have to take part in local meeting, understand the intricacies of writing spells, ride on the magic transport, try to take away magic prizes, play in popular wizards game, help magic government in ruling the country and resolve financial dispute of two famous wizards.

Scoring is standard is standard in both divisions today (500-1000-1500-2000-2500).

UPD: analyse was published.

Good luck!

• +207

 » 10 years ago, # |   +21 After a long time both there is a contest for both divisions. I really liked the previous one which had rated the problems dynamically.
 » 10 years ago, # |   -46 so,just fight!
 » 10 years ago, # |   -58 One more comment.
 » 10 years ago, # |   0 This may be a silly question at this point but — how do I ask for clarifications? (if there is such thing)
•  » » 10 years ago, # ^ |   +2 Ask a question link on problems tab
 » 10 years ago, # |   -23 The problems were as if I was sitting in my English examination to read comprehensions...
 » 10 years ago, # |   -7 It should be 500 1500 1500 2000 2500 in Div 2
•  » » 10 years ago, # ^ |   -11 maybe 500 1000 1000 2500 2500?))
•  » » » 10 years ago, # ^ |   -7 the 4rd problem is too hard to read>_< i can not analyse the samples >_<
•  » » » » 10 years ago, # ^ | ← Rev. 2 →   +9 4th, not 4rd.
•  » » 10 years ago, # ^ | ← Rev. 3 →   -12 maybe 2500 2500 500 500 500? why not? //sarcasm
 » 10 years ago, # |   +29 My screencast will be here shortlyNot very eventful through as I spent most of my time with pen and paper ;)
•  » » 10 years ago, # ^ |   0 Why can you test the sample testcases so fast? That's amazing!
•  » » » 10 years ago, # ^ |   +3 they are parsed and auto tested by CHelper
•  » » » 10 years ago, # ^ |   0 For Java check thisThere are some tools to parse tests for other languages, cannot easily locate them through
 » 10 years ago, # | ← Rev. 2 →   0 what will happen if try to access the index which is not allocated. By default what is stored in it ( here in C++ ) ? http://www.codeforces.com/contest/168/submission/1429535
 » 10 years ago, # |   +25 When are the system test starting???
 » 10 years ago, # |   -14 Problem B div1, is a simple dynamic programming, but the Hardest part of problem was undrestanding of that (at least for me). However with help of writers I got that finally.
•  » » 10 years ago, # ^ |   -17 at last. i also cant not understand the problem。。。。。。it is too .........
 » 10 years ago, # |   -27 GREAT PROBLEMS
 » 10 years ago, # |   +10 Today I learned that in Java StringBuffer is much faster than String .In Div-2 ,Prob B My solution in which i concatenate two Strings give TLE while just replacing the String with StringBuffer gives accepted in this code,and that too in 330 ms. :)
•  » » 10 years ago, # ^ |   +1 and StingBuilder is even faster coz StringBuffer uses StringBulder.
•  » » 10 years ago, # ^ |   0 It's necessary to know all language features if you write in it. Code s += t; , after compilation and decompilation, transforms into s = new StringBuilder(s).append(t).toString(); which works in O(length(s)+length(t))
 » 10 years ago, # |   +31 I wonder why updating ratings takes so long.
•  » » 10 years ago, # ^ |   +27 I'm too. I'm waiting for RAD or Gerald.
•  » » 10 years ago, # ^ |   +8 update the ratings is longer than the contest it self
•  » » 10 years ago, # ^ |   +20 Honestly, I think the rating formula should be modified after seeing tourist got -1 rating for his 2nd place.
•  » » » 10 years ago, # ^ |   0 However, his rating is much higher than anyone who participated the contest.
•  » » » » 10 years ago, # ^ | ← Rev. 3 →   0 Despite that fact (and 5 of top 10 coders didn't compete), I suppose his rating would gain 5-10. It seems tough to participate in a win-or-minus-rating round, even if he is the best. Take a look at Topcoder, I find that there are about 600 coders with rating 1800 or higher, while that number in Codeforces is 1000. I know that it isn't necessary for Codeforces to be compared with Topcoder or something else, but above numbers probably show some "rating inflation".
•  » » » 10 years ago, # ^ |   0 Moreover, i'll like to add one more thing......the rating limit separating Div 2 and Div 1(at Present it is 1700) Should be Decreased to 1600 or 1650 at least....bcoz a coder at 1600+ is capable enough....and for him solving Div2 A and B solving is not fun, as they really very simple and implementing them is really a time waste for him(approx 30-40 mins wasted for solving first 2 problems on average)......and hence he able to give comparatively less time for problem C and D.Instead it would be better if he can start from Div2 C which is Div 1 A.....i think this will avoid time waste for that user and he will evolve faster while competing in Div !.Other Suggestions are welcomed..
•  » » » » 10 years ago, # ^ |   +11 > they really very simple> approx 30-40 mins wasted for solving first 2 problems on average
 » 10 years ago, # |   0 It was a very interesting round with good problems......I think the author is very fond of mathematical problems(my rating goes up yahooooooooo).......however the problem statement of B(Div 1) was not very clear to me and I think for many others........I guessed that participant can take the tours in any order and coded accordingly and got accepted....still I m confused what it says......anyway hoping for a better problem description in future contests.....
 » 8 years ago, # | ← Rev. 3 →   0 Please can anyone tell me why this happened ? I could remove TLE in Div1 A after I replaced cout.precision(10) ; for(int i = 1 ; i < n ; ++i){cout << ans << "\n" ; }withfor(int i = 1 ; i < n ; ++i){printf("%.6lf\n",ans) ; }Is printing after using cout.precision slow ?
•  » » 8 years ago, # ^ |   +1 it is well-known fact that printf is much faster than cout.
•  » » 8 years ago, # ^ |   +1 Also, try ios_base::sync_with_stdio(false), it makes cout go much faster than usual.
•  » » 8 years ago, # ^ |   +1 Moreover, you have different precision in cout and printf! Program with small output size is faster than the same program with large output size =)
 » 8 years ago, # |   0 In case anybody is looking for the tutorial, it can be found here: http://codeforces.com/blog/entry/4214