I_love_Nastya's blog

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

Hello everybody!

I am glad to announce that Codeforces Round #138 will be held today at 19:30 MSK. I (Vasiliy Vadimov) am the author of this round. It is my first Codeforces round, I just helped other authors to prepare their rounds before.

I would like to thank Gerald Gerald Agapov for his help in the preparing of the round and Maria Delinur Belova for translation of the problems' statements in English. Also I am grateful to Mike MikeMirzayanov Mirzayanov for such an excellent contest system as Codeforces.

Good luck! I hope you will be interested in the problems.

The point distribution is standard in both divisions (500-1000-1500-2000-2500).

UPD. Attention! D language will not be available on this contest.

UPD2. The round is over, top-5 in both divisions:

Div1:

  1. Petr
  2. tourist
  3. peter50216
  4. Shik
  5. Egor

Div2:

  1. he.andrew.mail
  2. ordcoder
  3. scipianus
  4. jonathanpaulson
  5. void_rank

Congratulations to the winners!

Also I am apologising for mistakes in statement of problem div1 A/div2 C. The tutorial will be published tomorrow.

UPD3. The tutorial is available here.

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

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

Good luck and having fun to all!!! I hope, that problemset will be interesting.

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

    Кстати, уж простите за оффтоп. Меня вот интересует вопрос целесообразности этого:

    Комментарий скрыт по причине большого числа негативных отзывов о нем, нажмите здесь для его просмотра
    

    А как много пользователей не нажимают на "здесь", чтобы посмотреть, что же там всё же заминусовано? =) Может, стоит просто засветлять сообщение? Единственная причина, по которой мне может видеться полезным такой подход, -- огромные картинки и/или стены мусорного текста, но тогда хорошо бы сделать ссылочку, чтобы прятать их обратно.

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

      На хабре, к слову, это сделано гораздо юзабельнее, лично по мне. Блеклость текста не мешает его читаемости, в отличие от полного его скрытия.

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

        а зачем вообще затемнять коммент?

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

          Чтоб знать, что минусовать.

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

      Когда ветки огромные или over9000 сообщений я читаю либо комменты с "+20", либо скрытые.

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

      Иногда нажимаю, иногда нет. Вообще, нравится эта штука со скрытием. Не понимаю, в чём проблема.

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

Waiting for interesting and useful Contest.

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

What do you mean by "D language will not be available on this contest". Is there no translation of the problem D?

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

about problem C:

what is the answer of ((()))? should be 0

or 0 ((()))

?

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

    I think any of them would be ok.

  • »
    »
    7 years ago, # ^ |
    Rev. 2   Vote: I like it +6 Vote: I do not like it
    > If there are more than one optimal solutions print any of them.
    

    So you can print any proper subsequence, including empty. Anyway, do not ask questions about problems during the contest here, for this purpose there is "Questions about problems".

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

Not important, hidden.

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

Problem E was great.

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

    I can't comment on E as I had not even read it during the contest, but I actually liked problems

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

My first hack in Division 1 :) [[] :D

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

    Thanks for telling the testcase you hacked me with :D

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

Can anybody teach me how to solve div2 E? Lucas?

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

    You can calculate how many ai is in aj. So you can find the formula is C(k-1+j-i,j-i) (It is combination number). And you can use C(a+b+1,b+1)=C(a+b,b)*(a+b+1)/(b+1) to get C.

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

D and E are too hard hah....sad....

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

Hi friends, I get WA on Test Case 23 and I dont understand what happend. Thanks in advance.

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

    Under "Answer" is the correct answer for the test. Under "Output" is your output. You have no output for that test.

    Edit: lol, don't edit your post like that :)

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

      Thanks friend, Now I see this problem.

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

Div 2, D problem. in test where's |t|>|s| which answer must be?

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

    No, because there is no substrings at all. So no symbol (and there is at least one) is covered.

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

    The correct output is No. You can't make the substring. I failed on test 115 that was aa aaa , silly mistake

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

I spent all the time in the first three problem so that I didn't read the problem D,E.I think they are good problems,thank you!

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

Our ratings have changed 2 times! Admin please fix this error! UPD: I think it's fixed already, thanks :)

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

    Admin, please, dont fix it ;)

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

    Yes, I am DIV 1 now... This must be a mistake (+180 pts) ...

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

Div 2, problem B. Where is my mistake? id: 2192405.

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

Can someone please help me with problem C div 2, I got WA on test 58 and I can't find my bug. link: Link

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

    Perhaps you are pop()ping too many elements when kt.size()==0? Here's a smaller failing test case: [[[]]])

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

Nice problems — I liked the contest very much! Probably a bit on the hard end, but still :)

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

Thanks for your great contest! The problems were really good and enjoyable. But I have a question: after the contest my rating became 1557 and about 10 minutes later it became 1503! And now it's again 1557. What happend? What was the problem?

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

    Actually, you output a symbol with code 0 before the string, at least on my system.

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

It will be better if someone give detail explanation of problem D and E. Please someone help ...

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

On div2 C i did so: Found every correct sequence and counted the maximum of ['s a correct sequence have and then saved that sequence. But i got WA on Pretest #9. Maybe i did something wrong in the code, or i don't know, but i find my solution to be ok.

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

    First of all, it would help to write your submission number 2203267 if you want to get any help. Secondly, if you have looked at it yourself, which you should have done, then you would see that on test 9 your output is:

    4
    [[]]()[][][()]

    which has 5 [] braces, and the checker tells you exactly that.

    Finally, in the following case:

    100000
    [][][][]...[][][][]

    The number of correct non-empty sequences is 1,250,025,000 which is a lot, so I assume that your solution would get TLE even if it's corrected.

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

      Well, i don't think so. My solution has a time complexity of O(N), using a stack. In O(N) time, on a vector, it puts 1 on the ith position if that position is from a correct bracket sequence. After that, also in O(N) time, i search for the correct sequence which has the most '['s.

      Also, I asked for help because the 9th test is too long (I can't copy the test to see what's wrong, because there is "..." at the end.).

      Thanks for the answer also, even if it is not the one that I wanted.

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

Sorry to interrupt, but why the tutorial link leads to a "ru" page?

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

    Because there is no english editorial yet. UPD. Sorry, there it is :)

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

Could anyone translate the tutorial? I don't understand Russian, google translate sucks and i want know the solutions...

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

I am having wrong answer in Test 78. The test case is too big and thus got truncated. I have been trying to find the bug for a while now, could someone help? Here's my code.

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

    Your solution produces wrong answer on this test:

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

      Unfortunately, I copied the wrong code. Now it's corrected. Could you please check?