JuanMata's blog

By JuanMata, 5 years ago, In English,

Hello everyone!

Codeforces Round #258 (Div. 2) will take place on July 24, 19:30 MSK. Traditionally, Div. 1 users can take part out of the competition.

The round was prepared by praveen123 and me (JuanMata). This is our second Codeforces round, and hopefully not our last.

We have tried our best to make the problem statements as clear and interesting as possible. We hope that everyone will enjoy the round. :)

Special thanks to MikeMirzayanov for creating the wonderful Polygon and Codeforces platforms, Gerald for his extensive help in problem verification and testing, and Delinur for translation of problem statements into Russian. Without their help the contest would never have seen the day.

We wish all the participants good luck and high rating. :)

UPD: It is decided to use the dynamic scoring system.

UPD: Contest is finished. You can find the editorial here. :)

UPD: Congratulations to the winners. Here are the top 8 (the only ones to solve all the problems):

  1. wall
  2. western_theory
  3. 23333333333
  4. chenrui9551
  5. zhouhebin
  6. MaxKU
  7. jmas2711
  8. hzwer

UPD: Wonderful statistics by DmitriyH can be found here. :)

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

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

Hey...It's time to make a Div 1 round! :)

»
5 years ago, # |
Rev. 2   Vote: I like it +19 Vote: I do not like it

Second time from India and third time from Indian subcontinent... :)
*** Editorail of your last round (Round 251) was awesome... Hope the best for this time, too... :)

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

    Thank you so much for your review. We will try to make it better this time :)

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

Who is going to be the main character? Devu again? :D

Good Luck

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

Why isn't this post on the home page too like all the other contest announcement posts? EDIT:fixed

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

Thanks, for providing the link of polygon. I was unaware of it.

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

    You could just google it !

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

      I was initially unaware of polygon, I only come to know about it through a blog post. I did not really know that everybody can make problems for even their own contests. polygon is quite nice :)

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

I know JuanMata personally and I can vouch for two things.

One is clear problem statements.

Another is — expect buttloads of football.

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

    "One is clear problem statements.", this should be correct, let us hope :).
    "expect buttloads of football.", no, not really.

    Actually he is a bit busy in his google orientation. So the problems statements are written by me. Otherwise you would have been completely right :)

    UPD: He has some time free today and tomorrow :) So you might expect both.

  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it +7 Vote: I do not like it

    i actually wanted this round to happen before the FIFA World Cup ended. but due to other contests in queue this was not possible. otherwise ur second point would have surely been true. :)

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

What was your first Codeforces round that you made its problem statemets?

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

There was a notification that today codeforces will not be available during some time, can somebody please tell me the exact timings when the site will be down, I forgot to note that down :(

  • »
    »
    5 years ago, # ^ |
    Rev. 3   Vote: I like it +4 Vote: I do not like it

    I Think it is 2:30am — 6:30am in IST as far as I remember It was 1:00am — 5:00am in MSK

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

    will Polygon also be down during that time?

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

why 258 is BOLD?

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

    so that it is easy for you to choose name of the directory for participating in the contest :P

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

Wa!So nice!

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

Wow, such contest, very good, but I'm too young, too simple and sometimes naive. But your contest makes me feel "EXCITED"!

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

Good Luck JuanMata!!

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

and scores??

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

I like the editorials of praveen123 . They are awesome at codechef and hope here also .

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

YESSSSSS another juanmata CONTESSSST!!!!

^_^

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

Even though the scoring is dynamic Please can you accept my request to sort the problems in increasing order of difficulty(According to you) so that I am atleast sure of solving the first two problems and don't have to click on standings again and again to confirm which problem is the most solvable .

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

    In IOI and ACM-ICPC problems are not in increasing order of difficulty.

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

is it allowed to use c#?

»
5 years ago, # |
Rev. 2   Vote: I like it -21 Vote: I do not like it

UPD: It is decided to use the dynamic scoring system.

WHY??? :(

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

dynamic scoring = rating drop (in my case)

...but maybe this time finally :-D Never give up!

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

    I think this contest will prove exception to " rating drop (in my case)" :)

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

      If it really prove exception ,it will be my first time to be DIV1 let us play the game till the end and see the results :)

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

        haha, same here, currently I'm a little closer to DIV I, but it can be different after the contest, good luck ;-)

        • »
          »
          »
          »
          »
          5 years ago, # ^ |
          Rev. 2   Vote: I like it +11 Vote: I do not like it

          anyway whatever the results I'm happy to solve D ,I think it's my first time ,I need only 6 point for DIV1

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

    same for me, I'm too unlucky in dynamic score

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

I'm so sad when my points gone down and my name change to be green. I will be more hardly.

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

Bring it on. Our ratings shall keep going up. :)

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

i am a new user of codeforces can anyone help me please? what does DIV.1 and DIV.2 mean?

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

    When You are a beginner , you are attending the contest from DIV2 . When performing good in some DIV2 contests and achieving a handsome rating(1700+) , you will be able to attend the contest from DIV1.

    the problems of DIV1 are harder than the problems of DIV2. Good Luck :)

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

Dynamic score is ALWAYS dramatic... Can' t adjust the contest very well... And NO new users-without-any-submissions spoil our fun again...

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

Dynamic scoring is usually not very good!

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

In fact,I'm not good at dynamic scoring system.

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

4255 till now ,seems that we will have a long queue :)

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

I register for the contest but after that i realize i can't participate. very sad. wish all participants high rating!

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

АААААААААААААААААААА ЕЩЕ 1 минута!!!!!!

Держитесь крепче!!!!!!!!!

Сейчас прокатимся!!!

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

I didn't see the part of problem D that string is only consisted by 'a' and 'b'. In my opinion you must wrote this important part of statement in problem statement, not only in input.

Btw, great contest, thank you.

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

    oh i got to know it now .... even i missed it .. but the contest was awesome .

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

    I didn't see it too :(

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

    i see "Each character of the string will be either 'a' or 'b'" right now after reading your comments. :))

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

    I didn't notice it too!

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

    I noticed it after 20 minutes. What about bolding these important things ? :))

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

    What was the approach to solve problem D?

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

Problem statement should be tested more carefully before launch. Hope next time we'll not be bother

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

Hey guys , I can't see others submission even after locking my problem.This problem is from the beginning. I lock my problem , I go to standings , I double click a submission of my locked problem. then I click the submission number. But nothing happens. After contest it's just fine. But I can see during the contest;. Why?

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

    During the contest, you can only see the codes of people in your ROOM after you lock. The way to do so is in the Room tab.

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

    you must go to the your room, not standing.

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

    You can see and hack only solutions of contestants in your room, so go to your room instead of standings

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

    if you want to hack others code, just go to room and double-click on the submission. but, to see another code such in regular (not in the contest time) i think you cannot do it. CMIIW.

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

Awesome contest! Thanks, JuanMata and praveen123 :)

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

I suspect that problem B is difficult to hack, and there are small amount of hacks, but some systest fails will apear.

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

    Got WA on Test 74 :(

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

      I solved problem B incorrectly at 35 min. Later I tried to find mistakes, and found that tests like "3\n2 3 1" do not pass, because answer is "no", but program gives "yes\n2 3". I rewrote code, and had 10 minutes to search the same bug in codes of others, but it was difficult to understand whole long codes, and I didn't try to use this or more difficult test.

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

      I got WA on Test 69, because I did not take into account when n is 1 :(((

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

    507 sysfails! Initially 2187 -> later 1680 !

»
5 years ago, # |
Rev. 2   Vote: I like it +16 Vote: I do not like it

Nice round. Congrats to the authors! How to solve E ?

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

    Use Inclusion Exclusion princicple to solve the equationa[1] + a[2] + a[3] + .... + a[n] = s

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

How was problem C supposed to be solved?

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

    First, the condition is n%3 == 0. |Solve this system of equations : |x1-x2| = d1, |x2-x3| = d2, x1+x2+x3 = k with x1,x2,x3 is wins of team 1,2,3. Have 4 cases to solve. After check (n-k) is enough to give x1,x2,x3 to X1,X2,X3 satisfy X1=X2=X3=X.

    • »
      »
      »
      5 years ago, # ^ |
      Rev. 2   Vote: I like it 0 Vote: I do not like it
      5
      3 0 0 0
      3 3 0 0
      6 4 1 0
      6 3 3 0
      3 3 3 2
      

      What with sample 5? It's impossible to play only three matches and have differences three won between 1v2 and 2 won between 2v3.

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

        yes, after k = 3 games this situation is impossible.
        the information given by our friend is inconsistent (what a bad friend, spoiling the football tournament for you! :P).
        so the answer is no by default.

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

          Thanks a lot. I just didn't know if I have to check case like this.

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

      Thanx for explanation.I have implemented in the same way suggested by you in problem C but I am getting WA on test 4 and I am unable to determine the bug .Would you please take out your valuable time for it.Any help will be appreciated.Thank You. http://codeforces.com/contest/451/submission/7234615

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

      Thanx for explanation.I have implemented in the same way suggested by you in problem C but I am getting WA on test 4 and I am unable to determine the bug .Would you please take out your valuable time for it.Any help will be appreciated.Thank You. http://codeforces.com/contest/451/submission/7234615

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

    test for

    d1 =  ± d1

    d2 =  ± d2

    , always checking if you can have K games with those differences. doing so, you just have to solve a system of linear equations:

    Δ V1 + d1 = Δ V2

    Δ V1 + d1 + d2 = Δ V3

    Δ V1 + Δ V2 + Δ V3 = N - K

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

    I used binary search on the winning value of the middle team. Firstly , I have four case ++,-+,+- and --. Now for each case I tried to figure out the configuration that would fit into k. You can see my submission ,7228843.

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

Перед отправкой решения меня выкидывало из аккаунта.У кого ещё была такая же проблема?

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

    Надо поставить галочку "Запомнить на месяц" при входе

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

Wow, such fast system test which only cost 7 minutes.

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

System test is so fast! And I am very happy because I solved four problems in Div2 for the first time!

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

Give us editorial, please

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

worst contest that i see in my life!!!

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

WA on test case 67 :(

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

I scared I will get down rating

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

congratulations TankEngineer !

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

Got WA on b in test 69, because I did not take into account when n is equal to 1 :(

Also, what's wrong with my solution for C?

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

The contest was great! Btw, how to solve problem D ?

  • »
    »
    5 years ago, # ^ |
    Rev. 2   Vote: I like it +9 Vote: I do not like it

    Suppose you have found the number of odd and even palindromic substring for the first few characters of the string. For example, aabaaabb have 8 even palindromic substring and 13 odd palindromic substring. At the same time, we maintain the number of 'a's at even and odd positions, and the number of 'b's at odd and even positions respectively. In the above example, we have 2'a's at odd positions and 3'a's at even positions, while we have 2'b's at odd positions and another 'b' at even position.

    When we append a new character to the end of the string, we can compute the number of palindromic substring which ends with the new character. For example, if the appended character is 'a', the number of odd palindromic substring which ends with the new character will be the number of 'a's at odd positions, and the number of even palindromic substring which ends with the new 'a' will be the number of 'a's at even positions. Hence, the new string aabaaabba will have 11 (8+3) even palindromic substring and 16 (13+2+1) odd palindromic substrings (don't forget to consider the new character as a substring of length 1). There are several cases to consider depending on the parity of the position for the new character, but it is not hard to code them out.

    Repeat the above steps, each time appending a new character to obtain the final results. Example solution here: 7227422

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

      I didn't notice that the substring between 2 'a' or 'b' is always a good string :( If I did, I would be violet now :(

      Anyway, thank you very much :D

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

too long, update rating

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

Juanmata, fortunately for you, someone got 258th place, however, no one got 123th place in a round prepared partially by praveen123

If you didn't understand what I am talking about, read this comment

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

    LOL. but atleast OP has got +123 votes (at the time of writing this comment). :)

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

Did anyone use Hightail for the contest ? How was the experience ?

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

Nice Round.. Got many fun reading and thinking about the problems.. Still getting fun analyzing the errors of mine... Thank you very much.. Enjoyed the contest.. Hope we will get many more like this..... :D

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

Gave very bad contest but still +11. So sad.:(

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

I got down rating !

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

Thank you for the contest :) Very interesting problems.

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

Unbelievable! TankEngineer solved all problems in less than half an hour!!! Congratulations)

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

Problem D was awesome. Loved it :)

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

Hii,

In question B test case 26#

5

373362086 994096202 767275079 734424844 515504383

why "yes 2 5" is not an answer?by applying this, the sequence below is now a sorted sequence.

373362086 515504383 734424844 767275079 994096202

Please tell me if I am doing something really foolish.

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

In the title, why the font of "258" is Times New Roman, but not Verdana as "Codeforces Round"? :P

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

hey... in Problem C, initial number of wins for a, b, and c are not coming to be integer values for some test cases like: -> 999999999980 258442058745 258442058715 258442058720.

Please correct me if I am wrong.

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

    If n % 3 != 0, answer is "no". Because each team must have n/3 wins.

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

      Thanks for your reply...but that was not what I asked. -_-