PavelKunyavskiy's blog

By PavelKunyavskiy, 7 years ago, translation, In English,

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), kuniavski (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!

 
 
 
 
  • Vote: I like it  
  • +207
  • Vote: I do not like it  

»
7 years ago, # |
  Vote: I like it +21 Vote: I do not like it

After a long time both there is a contest for both divisions. I really liked the previous one which had rated the problems dynamically.

»
7 years ago, # |
  Vote: I like it -46 Vote: I do not like it

so,just fight!

»
7 years ago, # |
  Vote: I like it -58 Vote: I do not like it

One more comment.

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

This may be a silly question at this point but — how do I ask for clarifications? (if there is such thing)

»
7 years ago, # |
  Vote: I like it -23 Vote: I do not like it

The problems were as if I was sitting in my English examination to read comprehensions...

»
7 years ago, # |
  Vote: I like it -7 Vote: I do not like it

It should be 500 1500 1500 2000 2500 in Div 2

»
7 years ago, # |
  Vote: I like it +29 Vote: I do not like it

My screencast will be here shortly

Not very eventful through as I spent most of my time with pen and paper ;)

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why can you test the sample testcases so fast? That's amazing!

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      they are parsed and auto tested by CHelper

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      For Java check this

      There are some tools to parse tests for other languages, cannot easily locate them through

»
7 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

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

»
7 years ago, # |
  Vote: I like it +25 Vote: I do not like it

When are the system test starting???

»
7 years ago, # |
  Vote: I like it -14 Vote: I do not like it

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.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it -17 Vote: I do not like it

    at last. i also cant not understand the problem。。。。。。it is too .........

»
7 years ago, # |
  Vote: I like it -27 Vote: I do not like it

GREAT PROBLEMS

»
7 years ago, # |
  Vote: I like it +10 Vote: I do not like it

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. :)

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    and StingBuilder is even faster coz StringBuffer uses StringBulder.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    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))

»
7 years ago, # |
  Vote: I like it +31 Vote: I do not like it

I wonder why updating ratings takes so long.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +27 Vote: I do not like it

    I'm too. I'm waiting for RAD or Gerald.

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +8 Vote: I do not like it

    update the ratings is longer than the contest it self

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +20 Vote: I do not like it

    Honestly, I think the rating formula should be modified after seeing tourist got -1 rating for his 2nd place.

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      However, his rating is much higher than anyone who participated the contest.

      • »
        »
        »
        »
        7 years ago, # ^ |
        Rev. 3   Vote: I like it 0 Vote: I do not like it

        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".

    • »
      »
      »
      7 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      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..

      • »
        »
        »
        »
        7 years ago, # ^ |
          Vote: I like it +11 Vote: I do not like it

        > they really very simple

        > approx 30-40 mins wasted for solving first 2 problems on average

»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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.....

»
5 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

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" ; }

with

for(int i = 1 ; i < n ; ++i){printf("%.6lf\n",ans) ; }

Is printing after using cout.precision slow ?

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    it is well-known fact that printf is much faster than cout.

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Also, try ios_base::sync_with_stdio(false), it makes cout go much faster than usual.

  • »
    »
    5 years ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    Moreover, you have different precision in cout and printf! Program with small output size is faster than the same program with large output size =)

»
5 years ago, # |
  Vote: I like it 0 Vote: I do not like it

In case anybody is looking for the tutorial, it can be found here: http://codeforces.com/blog/entry/4214