Блог пользователя Devil

Автор Devil, 4 года назад, По-английски

Hello, Codeforces!

I'm very glad to invite you to the first Cuban round Codeforces Round 659 (Div. 1) and Codeforces Round 659 (Div. 2) which will take place on 24.07.2020 17:35 (Московское время).

All problems in this round were created and prepared by mnaeraxr, gilcu3, dcordb, jcg and me. We tried to make them interesting and diverse and hope that you will enjoy them!

You will be given 2 hours to solve 6 problems in both divisions, and we highly encourage you to read all of them :)

We would like to thank:

The score distribution will be announced shortly before the round (or earlier).

UPD: Here is the score distribution:

Div2: 500 — (500 + 750) — 1750 — 1750 — 2500 — 2500

Div1: 1000 — 1000 — 1750 — 1750 — 2000 — 2250

Good luck and have fun!

UPD: The editorial is ready Editorial

UPD: Congratulations to the winners!

Especially for tourist, Benq and Radewoosh who solved all the problems!!!

Div. 1:

  1. tourist

  2. Benq

  3. Radewoosh

  4. ksun48

  5. jiangly

  6. yosupo

  7. ecnerwala

  8. Egor

  9. Marcin_smu

  10. ainta

Div. 2:

  1. AhoCorasick

  2. okikust

  3. crystal302

  4. ServantSaber

  5. Kirill_Kudr22

  6. RunMIT

  7. tripPple_A

  8. CodeSlayer4425

  9. ZADaCHI

  10. ITO

  • Проголосовать: нравится
  • +732
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I hope for an interesting first cuban round :)

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +43 Проголосовать: не нравится

    This round was not at all interesting.

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +150 Проголосовать: не нравится

    It looks like someone forgot to mention that the contest was for Russian 5th to 8th graders. (No offence intended).

    Anyways, this just makes it more exciting. Thanks for this round.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +86 Проголосовать: не нравится

    New round to avoid : Cuban Round

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    It became really interesting when I tried submitting the first problem and not to mention, when I started reading Problem B.

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +98 Проголосовать: не нравится

    Who is this Koa the Koala and why does she want to cross the shore?

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +76 Проголосовать: не нравится

      Google's first result for "can koala swim?"

      "Koalas drown in swimming pools when they are looking for water to drink. Although koalas can swim, if there are no assisted ways for a koala to climb out they will eventually drown."

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +41 Проголосовать: не нравится

    did someone forget this was a coding round and not a reading round?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    why is everyone downvoting because of the contest... :(

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +14 Проголосовать: не нравится

    I started reading the first problem , and before i could even see the test cases , the round was over...

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +6 Проголосовать: не нравится

      I suggest improving your reading comprehension before trying a competition. Good Luck!

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    I would rather do Eva than doing these problems

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +9 Проголосовать: не нравится

    Score for B1 should be more than C. Currently B1 score is significantly low than that of C. And every one knows the level of these 2 questions.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +21 Проголосовать: не нравится

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    After seeing too many Red coders as testers, we should prepare ourself for such a lengthy, disordered(e.g. problem B and C order) round.

»
4 года назад, # |
  Проголосовать: нравится -82 Проголосовать: не нравится

Shitty memes incoming!!!!!!

»
4 года назад, # |
  Проголосовать: нравится -44 Проголосовать: не нравится

Lol you are from Havana University

»
4 года назад, # |
  Проголосовать: нравится -16 Проголосовать: не нравится

what is cuban round ?

»
4 года назад, # |
  Проголосовать: нравится +302 Проголосовать: не нравится

As a tester, I finally get to make one of these posts.

»
4 года назад, # |
Rev. 4   Проголосовать: нравится -55 Проголосовать: не нравится

This comment was downvoted by trolls

»
4 года назад, # |
  Проголосовать: нравится +73 Проголосовать: не нравится

Last time with this much red coders, we saw something dangerous.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится -92 Проголосовать: не нравится

When last contest is rated and you want another contest to participate in and you are happy and confused at the same time!!!:

»
4 года назад, # |
  Проголосовать: нравится +56 Проголосовать: не нравится

Will it be IQ test round? I like IQ tests.

»
4 года назад, # |
  Проголосовать: нравится +103 Проголосовать: не нравится

As a tester, I’m glad I tested.

»
4 года назад, # |
  Проголосовать: нравится +30 Проголосовать: не нравится

There is an amazing team behind this contest. I'm looking forward to participate. Good rating everyone

»
4 года назад, # |
  Проголосовать: нравится +74 Проголосовать: не нравится

As a non-tester, I'm glad that I'll be able to participate in it <(")

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

So happy

»
4 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

Imagine getting back from retirement for a Cuban round, writers are all amazing. Looking forward to it, see you in the standings, altho I prolly don't pass a,b :). Удачи

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +13 Проголосовать: не нравится

The Div1 part of the contest is shown in Calendar on saturday, too. I think this is not intentionally.

»
4 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

We still remember the last red round

»
4 года назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

After a long time Um_nik became as a tester. I hope this round will be great.

»
4 года назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

It's a good opportunity for me to become PUPIL again :)

»
4 года назад, # |
  Проголосовать: нравится +37 Проголосовать: не нравится

Congratulations! :)

»
4 года назад, # |
  Проголосовать: нравится +44 Проголосовать: не нравится

Yes, i have heard of Cuban. Krasnodar is the best city.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +55 Проголосовать: не нравится

    No no no, not that Cuban. This Cuba

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +29 Проголосовать: не нравится

      Why do you downvoting me? That was just a joke. Of course i know what cuban means. Why do you upvoting some captain obviousness who didn't get the joke and tried to "explain" me what Cuban is?

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +16 Проголосовать: не нравится

        Some people just don't get sarcasm, man. I upvoted you and am glad that your comment is now receiving upvotes too.

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится -26 Проголосовать: не нравится

    .

»
4 года назад, # |
  Проголосовать: нравится +53 Проголосовать: не нравится
Div2 A
»
4 года назад, # |
  Проголосовать: нравится -23 Проголосовать: не нравится

As a participant, I am all scared looking at so many Reds

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

You can do it! who want to become green, blue, ...

»
4 года назад, # |
Rev. 2   Проголосовать: нравится -69 Проголосовать: не нравится

Ok

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Very excited for my first contest! I have covered all the basic data structures in past 1 month . Now I am looking to take part more frequently . Any suggestions on how to be consistent and any further resources ??

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

In codeforces round When I submit the problem and it gets pretests passed in very first submission. Ooh that feelings can't explain in words. When I am writing this I am crying with smiling face

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +4 Проголосовать: не нравится

    I think you haven't experience that feeling when you submitted it WA 10 times and the 11th time is got Pretest passed. Literally crying with smiling face.

»
4 года назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

As a tester, I wish every participant good luck and high rating on this (very nice) round!

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

I Hope Cuban round will be as good as Cuban Cigar. :)

»
4 года назад, # |
  Проголосовать: нравится +47 Проголосовать: не нравится

A very interesting score distribution!

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +116 Проголосовать: не нравится

Perfectly balanced, as all things should be

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +60 Проголосовать: не нравится

 ( ° ͜ʖ °)

»
4 года назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

Wait, do we have subtasks in div2(asking because of the score distribution/and that it isn't mentioned)

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

I think that you should also author the seventh round following this one.

»
4 года назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

hello darkness, my old friend

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +6 Проголосовать: не нравится

Will Tourist top the tables today??

»
4 года назад, # |
  Проголосовать: нравится +16 Проголосовать: не нравится

Hope,this first cuban round will be very interesting :D

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +2 Проголосовать: не нравится

Interesting score distribution! GL & HF!

»
4 года назад, # |
Rev. 5   Проголосовать: нравится -12 Проголосовать: не нравится

ups

»
4 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

A sub-task for B? This is going to be wild.

»
4 года назад, # |
  Проголосовать: нравится -10 Проголосовать: не нравится

Difficulty 1750, hope I could solve them.

»
4 года назад, # |
  Проголосовать: нравится +66 Проголосовать: не нравится

My schedule this summer,

EAT -> PARTICIPATE IN CF CONTEST -> READ EDITORIAL -> SLEEP

REPEAT

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

good luck to you !!!

»
4 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

MikeMirzayanov Just curious to ask when running 2 contests (Div1 and Div2) you use the same server fot both the contests or 2 different servers (with Div1 having less specification server because of load)

»
4 года назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

Another Anton Round!

»
4 года назад, # |
  Проголосовать: нравится -6 Проголосовать: не нравится

tourist registered for the contest, I think he'll take his position today!

»
4 года назад, # |
Rev. 2   Проголосовать: нравится -7 Проголосовать: не нравится

i am having 1940 rating. and I don't want it to decrease for next 2 month so just wondering if someone can tell me how much maximum rank can ensure me 0 decrease? like any idea? is around 1000 fine

»
4 года назад, # |
  Проголосовать: нравится +33 Проголосовать: не нравится

photo-2020-07-24-17-23-42 .

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +64 Проголосовать: не нравится

    The meme is as hard to understand as solving Div.1F

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +9 Проголосовать: не нравится

    incase anyone didn't get the meme carefully read the second line of the announcement!

    See Here
»
4 года назад, # |
  Проголосовать: нравится +99 Проголосовать: не нравится

The new strategy to decrease server load is working!

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +21 Проголосовать: не нравится

Seems Red Coders doesn't think of beginner coders !!

»
4 года назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

Again a Div1 type contest :(

»
4 года назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +32 Проголосовать: не нравится

Glad I didn't submit even a single code!

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

div2 feels like div1 :(

»
4 года назад, # |
  Проголосовать: нравится +144 Проголосовать: не нравится

Last contest was such a class. Back to unnecessary complicated questions. All problem setters should learn something from Monogon and Ashishgup.

I know I am going to get downvoted to hell, but needed to get the truth out.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +26 Проголосовать: не нравится

    +1,I love Monogon's problem and this contest is quite bad.

    Some of Ehab's math problem are also good.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    Since ^ comment is getting some attention, I want to add if we can come up with a way to voice our opinion about the round? Maybe upvote/downvote a contest or individual problems?

    I am not against harder problems but there's a difference between good kind of hard and bad kind of hard.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +4 Проголосовать: не нравится

UPD: Figured what was wrong on pretest 3. Sorry for spreading hate.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I'm a newbie. I didn't even understand the questions.

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

my confidence is indirectly proportional to length of questions

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +11 Проголосовать: не нравится

    My confidence is directly proportional to length of questions. I cannot solve and more people cannot solve.

»
4 года назад, # |
  Проголосовать: нравится +37 Проголосовать: не нравится

Reading div2 B1-B2 problems is more difficult than doing a plank.

»
4 года назад, # |
  Проголосовать: нравится +48 Проголосовать: не нравится

Worst score distribution i have ever seen in Codeforces!!!

»
4 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

Div-2 contest doesnt seem to a div-2 type.No balance in problems at all.

»
4 года назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

Looks like Devil's plan at work here.

»
4 года назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

If the frequencies of these types of contest increases, it will inculcate the feeling of fear in beginners' mind towards competitive coding. No offense to anyone.

»
4 года назад, # |
  Проголосовать: нравится -10 Проголосовать: не нравится

you asked for harder questions, so there you go :P

»
4 года назад, # |
  Проголосовать: нравится +60 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +27 Проголосовать: не нравится

Me after reading Div2 A, B1, B2:

»
4 года назад, # |
Rev. 3   Проголосовать: нравится +18 Проголосовать: не нравится

Not worth complaining about the difficulty of the problems. Just improve next time and learn from your mistakes.

»
4 года назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

Do not trust someone whose account name is Devil

»
4 года назад, # |
  Проголосовать: нравится +30 Проголосовать: не нравится

Kudos to all problem setters and team. What a contest. I realized that need to learn more practice more.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

i was able to solve the first one phewwww!

»
4 года назад, # |
Rev. 2   Проголосовать: нравится -31 Проголосовать: не нравится

[Deleted]

»
4 года назад, # |
  Проголосовать: нравится +53 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +123 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +135 Проголосовать: не нравится

Another difficulty staircases

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

I thought WA on pretest 2 sucks the most, but today I learnt, WA on pretest 3 sucks the most. Getting WA on pretest 3 in C :(

Nvm I removed an if case and it worked. :)

»
4 года назад, # |
  Проголосовать: нравится +27 Проголосовать: не нравится

tourist returns to #1 !!!

»
4 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

Wait... Has Codeforces increased the difficulty of Div.2???

»
4 года назад, # |
  Проголосовать: нравится +63 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +120 Проголосовать: не нравится

<
»
4 года назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

The language of Div.2 B1 was very bad. :(

»
4 года назад, # |
  Проголосовать: нравится +52 Проголосовать: не нравится

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

I happy for tourist, he will return to it's normal position :) tourist

»
4 года назад, # |
  Проголосовать: нравится -44 Проголосовать: не нравится

Monogon's Div.1 contest was MUCH better than today's contest. problems were unbalanced and Div.1 B was terrible problem...

»
4 года назад, # |
  Проголосовать: нравится +28 Проголосовать: не нравится

TFW you not only fail to solve div1A, but can't understand why your solution to div1A is wrong.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    Same! But I suppose I'm somewhat relieved/surprised to see a grandmaster say this! No offense ofc.

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +34 Проголосовать: не нравится
    aabb
    xyxy
    

    I still have no idea how to solve that problem, although something did pass pretests eventually. Had to move to more trivial problems like E instead :)

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Go through all letters in increasing order. For each letter, get the minimum of letters that this letter needs to be converted to (lets aabb — xyxy: a converts to x and y, take the smaller one), then convert all the letters (a) to the lexicographically smaller one (x or y) (note you need to skip letters that are already ok).

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      What do you mean?

      For that one it's aabb bbbb xbxb xyxy

      (according to my code + my manual attempt)

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      So the transitive reduction of a DAG isn't a subgraph?

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +8 Проголосовать: не нравится

        Transitive reduction requires that there is a path from a to b if and only if there was a path from a to b in the original graph. This problem doesn't have the "only if" requirement.

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          24 (Dadgum.)

          I thought that adding more edges can't hurt the number of operations...

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Acc. to my code, aabb->xxbb->xxxx->xyxy

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Yes! Me too. WA on pretest 3...

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I also had a wrong pretest 3 at first and then I implemented a (in my mind) equal solution in a different and it worked lol (solution is back down). What I did it first was: go through letters in increasing order, if a letter is not good then convert it to a letter that also exists and needs to be converted to the same letter (ignore if it's already good, convert directly only if there are no such cases). Idk why this approach is any different than my other, could be just a program error since it's a bit more complex.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    I spent two whole hours battling pretest 3, only to no avail.

»
4 года назад, # |
  Проголосовать: нравится +46 Проголосовать: не нравится

It feels like the contest is based on some olympiad for students of 5-8 grades

»
4 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

I have a strange question. Who is Koa the Koala?

»
4 года назад, # |
  Проголосовать: нравится +27 Проголосовать: не нравится

Kind request to stop such bullshit Div2

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

lol, there was a duplicate test case in problem B. ~~~~~ 5 2 3 1 2 3 2 2 ~~~~~

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +4 Проголосовать: не нравится

    I was unable to reach sample test case left the problem after reading the problem statement only.

»
4 года назад, # |
  Проголосовать: нравится +47 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

bad problems , bad statements . didn't enjoyed this contest .

»
4 года назад, # |
  Проголосовать: нравится -9 Проголосовать: не нравится

This contest is not worth 2 hours of 20k Div-2 participants.

»
4 года назад, # |
  Проголосовать: нравится +30 Проголосовать: не нравится

thanks antontrygubO_o for amazing coordination of this round.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Anybody else having had problems opening the page of their room?

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Devil $$$2B$$$, Devil $$$1C$$$.

Devil Statement, Devil difficulty.

»
4 года назад, # |
  Проголосовать: нравится +16 Проголосовать: не нравится

Can someone explain why this idea gives WA3 in Div2-C / Div1-A?

If any letter needs to be changed to an alphabetically smaller one, output -1.

Otherwise, build a directed graph (e.g. a matrix) where graph[a][b] = 1 iff we need to change a to b at least one index, a<b.

Then, drop the unnecessary edges. An edge a->b is unnecessary iff there is another path with more nodes that connects a and b. Note that the path will contain strictly shorter (in the alphabetic sense) edges, so we can start with an empty graph and add edges of alphabetic difference 1, 2, 3, ... 19, at each point checking that the letters are not already connected.

The answer is the number of edges in the final graph. I have no idea what I'm missing.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    i did the same thing, WA on tc 3.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    So on the test AB, DC you will print 3, because A->B->C->D, right?

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

      My answer is 2. The original graph does not contain a->b or c->d, and I only ever remove edges.

      Edit: Okay, I see it. The entire problem is that I only remove edges. For example, in aabb -> cdcd the optimal solution is to turn aabb -> bbbb and then two more operations. My solution prints 4 because it cannot add the edge a->b.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      shouldn't it be 2? coz A -> C and B -> D ?

  • »
    »
    4 года назад, # ^ |
    Rev. 4   Проголосовать: нравится 0 Проголосовать: не нравится

    Got it

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    aabb cdcd

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    I did something weird, but it passed pretests somehow... basically ignore the fact that the graph is directed, answer = 20 — number of connected components.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    this problem can be solved by a simple dfs finding number of vertices in every component.

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

      infxx Can you please elucidate? I tried something similar but it didn't work. 87922305

      The major difference I see is that you are making the graph undirected(right?). Why so?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Norrius What is the fix for this approach?

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      It's really easy: just find the sizes of (undirected) connected components with DFS/BFS, let's say they are $$$c_1, ..., c_k$$$. Then the answer is $$$\sum_i (c_i - 1)$$$, because there is some spanning tree in each of the components, and you know how many edges a tree has.

      • »
        »
        »
        »
        4 года назад, # ^ |
        Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

        I don't quite get the intuition behind this fix? Like, how did you get to this? And why does that work? I get this idea that we need to find the minimum spanning tree(taking all edges' weight as 1) for our original directed graph(but there's an issue in it). But I do not get it that how making the graph undirected solves our issue?

»
4 года назад, # |
  Проголосовать: нравится +374 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

well

That was different

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

For Problem D in div 2., can we solve the problem for each bit independently?

Edit: NVM I just proved it to my self

Proof: if you have an odd number of bits, set at a particular position for all numbers in the array, the winner will be decided in this round Other wise you have an even number of bits, and your opponent will get the same result as you for that bit position.

»
4 года назад, # |
  Проголосовать: нравится +48 Проголосовать: не нравится

1384B1 - Koa and the Beach (Easy Version) is my new favorit of shittiest problem statement ever.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    Pictures would have helped.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      And some other story, mayby one which makes some sense or none at all... I needed to ask twice before understanding that the girl cannot swim if the water is to deep. How can somebody come up with such wired picture? This is simply the opposite of logic. I mean, why?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Yeah, adding "More formally, " just made it harder to understand.

»
4 года назад, # |
  Проголосовать: нравится +67 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Too time-consuming when reading Div2B problem :))

»
4 года назад, # |
  Проголосовать: нравится +91 Проголосовать: не нравится

So laughy to hear, when problems are nice in easy contest, and bad in hard contets. LOL. bad != hard.

Problems were cute && hard, div2 guys just cant solve them and find it is bad && want unrated — it is so stupid && two-faces

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    The problems were pretty good, it's just the fact that C was a lot easier than B in div2 (You can look by yourself). I find B as a very nice problem, but it took me more than 15 minutes to understand the statement.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +17 Проголосовать: не нравится

      Yeah, you are right. I am just angry about people who wrote that problems were bad and shitty

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +9 Проголосовать: не нравится

        I understood you. I'm also finding this annoying. If you understand the statements of the problems, they are enjoyable (in my opinion). I just hope that in the future, the authors will write the statements more concisely and the problems will go in increasing difficulty.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Finally a really accurated opinion. I left this community two years ago, when i retired from regionals. Now two years without basically coding at all, i return for the first cuban round, and i managed to solve A, B1, C and get a positive score given by the fact that when i retired there were approx 4000-6000 participants per round in Div2. I found out that now there are nearly 20k, but 16k of them at least, only know to cry about problems that a retired person can solve with 0 warn up, thanks so much codeforces, for leaving me this bad memory as about the first round written by my country.

    To the person who i'm replying, really my most sincere congratulation, for not being one of those crying babies. Thanks!

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Anyone else with wrong answer on pretest 3 in C? What was it??? :/

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    me :(

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится

    I guess that was the first real test with many test cases. Test 2 contained some corner cases I think

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Same here. Not sure what it was, but I know I did not handle a case like: aabb cdcd (Answer should be 3: converting a->b, then b->c and b->d)

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

C was DSU or DFS/BFS/ Spanning Tree loved solving it <3;

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    It was easy greedy. You overkilled it. Can you briefly say about dsu solution?

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +3 Проголосовать: не нравится

      I converted all conversions into the form of A to B in a directed graph if at the end of all conversions character A was required to be converted into B . Now if A>B then always answer is "-1" , this is self explanatory. Now I added all the edges to the graph , if A-->B , Now any successful completion or conversion can can be done efficiently if for every pair A to B to which conversion is required we follow exactly one path and no more than that , this conversion can be seen as path from node A to node B in the graph. Now for a connected components if we want minimum paths to follow and connect all characters which are need to be converted into one path, we need to find just a spanning tree of the obtained graph. Thus we can obtain it easily using any technique like BFS/DFS/DSU . Thus it was a good problem of Spanning tree, I think. May be I over-killed it.

      Consider the small case graph where aab-->bcc A->B , B->C, A->C. since the spanning tree of above graph will be A->B->C , which is minimum possible answer for this conversion process.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Can you please share your approach

»
4 года назад, # |
  Проголосовать: нравится -101 Проголосовать: не нравится

Time for antontrygubO_o to resign. What a disaster.

»
4 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

In my opinion Div 2 C (Div 1 A) was waaaaaaaay easier than Div 2 B.

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

New type of contest to avoid : Cuban Round

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +62 Проголосовать: не нравится

Div2D/Div1B solution is really nice:

Notice that for a given bit, if it occurs in an even number of elements, then the players will either both have this bit in their sums or both not have the bit (either both have an odd number or both have an even number of the bit) regardless of the actions taken in the game. Thus, we can look for the highest bit that occurs with odd frequency. If there is no such bit, then it must be a draw. Someone will have this bit in their sum, and someone else will not, and the other bits do not matter since this is greater than the sum of all the lower bits.

So, if we call this bit b, then we can replace all of our numbers with either 1 or 0 depending on whether or not they have bit b. Now we simply need to solve the case where there are only 0's and 1's in our array, which is left as an exercise to the reader.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    It wouldn't help me, unfortunately. I got almost all the conditions. I've checked if the number of 1's equals 1 instead of count % 4 == 1. I just considered 1 and 3 and did not notice that for 5, the first person also gets the odd number of elements...

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    But I just stuck in how to solve 0-1 array!!!Please tell me!

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится +6 Проголосовать: не нравится

      First, think about the case with no 0's. Who wins if there is just one 1? Three 1's? Five 1's?

      Now, add a single 0. How does that change things? How about a second? A third?

»
4 года назад, # |
  Проголосовать: нравится -14 Проголосовать: не нравится

bad contest with long statments

»
4 года назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

Nice way of reducing the load of the server and taking care of the long queues :P

»
4 года назад, # |
  Проголосовать: нравится +23 Проголосовать: не нравится

I feel lucky for div.1 participants for not having to solve such B.

»
4 года назад, # |
  Проголосовать: нравится +164 Проголосовать: не нравится

Awesome problems! From which AtCoder round did you steal E?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Jajaj thanks. It is nice to hear some good feedback. We (setters) are really glad you like the problems.

»
4 года назад, # |
  Проголосовать: нравится +100 Проголосовать: не нравится

I think I finally kinda understand people who whine about terse (few details) editorials.

Yesterday I tried to solve AGC 027 E. I found an easy classification about what intervals we can compress into a single element and what the result of that compression is. But I failed to come up with the DP that would count the subsequences.

Today I see 1383E - Strange Operation which is obviously very similar (basically, rules about collapsing intervals are simpler). I decide to read the editorial of 027E in the hopes that the DP might be similar. And what do I find from the editorial?

"We can count such $$$t$$$ by a simple DP. This solution works in $$$O(\left|s\right|)$$$ time." (end of editorial)

In other words "lol that's trivial" :/

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    That's one sure way to make us solve the exercises "left to the reader", just put them in another contest, right?

    Can you give a hint to the idea for problem E? I've observed that no zeros from different contiguous components can be in the final string, but I couldn't find a way to count all possible final strings beyond the multiplication when we don't delete any 1's.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +5 Проголосовать: не нравится

      In the end I'm not sure how much a more detailed editorial would have actually helped.

      Yeah it's basically "count # of distinct subsequences" with that restriction (and some additional fiddling with initial and final zeroes, which is too tedious to think about). For each subsequence let's count only the "leftmost".

      Suppose you have just ended a block of 1-s and would like to add a block of $$$k$$$ 0-s to your subsequence. Then you move find the first block of 0-s that's at least $$$k$$$ long and jump to the end of that.

      Suppose you have just ended a block of 0-s and would like to add a block of $$$k$$$ 1-s to your subsequence. Then you simply take the next $$$k$$$ 1-s in the original string and jump to that position.

      If you build a DP based on that you get $$$O(n^2)$$$ complexity, but it's relatively easy to optimize from there.

»
4 года назад, # |
  Проголосовать: нравится -8 Проголосовать: не нравится

Were pretests strong ?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Now I am eagerly waiting for someone to upload a video editorial of B and C and comment here !!!

»
4 года назад, # |
Rev. 3   Проголосовать: нравится +13 Проголосовать: не нравится

Don't know why but I thought

5
1 1 1 1 1

is "LOSE" in div1B for the whole contest :)

»
4 года назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

what the hell was test case 3 for Div2 C ?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Not certain (I didn't get C, but know one reason mine probably failed on it), but I bet it was something like: aabb cdcd Optimal is to convert a to b, then b to c and b to d, for 3 moves. I know I was still converting a-c,a-d,b-c,b-d.

»
4 года назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

Don't you think the Div.1 difficulty gap is terrible?

»
4 года назад, # |
Rev. 3   Проголосовать: нравится +3 Проголосовать: не нравится

in Problem D I added the following if statement 1.5 minutes before the end and it worked and i was ecstatic XD

Spoiler

I really hope my Python won't TLE because there was a point I thought the pretests didn't pass because I didn't have enough bits so I went all the way up to 50 (even though 30 is enough). So I spend 20*n work for no reason what so ever and it just might cause TLE (on python it's super sensitive).

EDIT: It didn't TLE! But it was sure close. one pretest was 936ms XDDD

»
4 года назад, # |
Rev. 2   Проголосовать: нравится -13 Проголосовать: не нравится

DIV 2 A before: You have to come up with something

DIV 2 A now: You have to write a long implementation

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +1 Проголосовать: не нравится
  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +14 Проголосовать: не нравится

    What are you talking about? it was like 11 lines of code and I was wasteful. I only used the letters 'a' and 'z'. You just have to use the last string, copy it until the prefix length, and add 'a'/'z' depending on situation.

    Python solution:

    Spoiler
  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Usually there was nothing to come up for in past rounds.

»
4 года назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

Another Russian olympiad for students of 5-8 grades :D.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +17 Проголосовать: не нравится

Highly Undistributed Difficulty Level (Div2)

The Ranks of Participants who solved only A lie from 2745->infinite.

It was FastSolveProblemA Forces. And was someone like me who made a wrong submission on A and faced -50 penalty,it was like like Facing the Real Devil.

Ranking dropped down Dead.

We need better adjusted ProblemSets.

Ciao Rating !

»
4 года назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

I wanted to drown myself trying to solve div2B

»
4 года назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

Damn! this round was soo tough than normal div 2 rounds

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Bring back the good old days when DIV-2 was actually DIV-2.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How is B1 easier than C, also why is points for B1 not even one third of C ?

Such a long statement for B1. B1 should atleast be of 1000 points.

»
4 года назад, # |
  Проголосовать: нравится -16 Проголосовать: не нравится

tourist comback Top rated

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +10 Проголосовать: не нравится

My idea for div1C

Let's make a directed graph G with 20 vertices (= letters) and edges from v1 to v2 if v1 needs to be changed to v2. Then we need to get a topological sorting S for G. Since it contains loops, pick the smallest possible set of vertices which are parts of any loop (so that if we remove these vertices, all the loops will be broken), put them in front of S, delete their inbound edges and sort the rest of the graph.

The answer will be size(S) — 1.

I don't know how to find loops in a directed graph and how to find that set of vertices :/

  • »
    »
    4 года назад, # ^ |
    Rev. 4   Проголосовать: нравится +10 Проголосовать: не нравится

    Hm, I'm not sure I totally understand your solution, but maybe something similar would work with condensation SCC graph? I tried to think of something like that but couldn't make it work.

    EDIT: Actually, I read your idea more closely. Wouldn't this imply that on the complete graph the answer is 19 when it should be 39 (I think)?

    I had a feeling there might have been some solution involving bitmasks since $$$|\alpha| = 20$$$ rather than 26.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +18 Проголосовать: не нравится

      Let's put the idea another way:

      You have a directed graph with cycles. First you may spend a move to cut the loop at some vertex V (by removing its inbound edges), then after all the loops are eliminated you perform a toposort on the graph. Suppose you cut the loops in vertices b, f, g, and toposort gives you a, m, b, g, q, f, s. Then the answer should be b -> f -> g -> a -> m -> b -> g -> q -> f -> s (=9). Arrows show how you should change letters.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +16 Проголосовать: не нравится

    Yes, this is correct. Finding the set of vertices you described is an NP-complete problem, so you basically have to try all possible sets and see if they break all loops or not (intended complexity is $$$O(\alpha \cdot 2^{\alpha})$$$).

»
4 года назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

I think there was a lack of coordination in setting the difficulty of the problems to the actual score...what a terrible round.antontrygubO_o

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Definately one of My Favourite Contests. Amazing Problem Set. Kudos to the Setters.

»
4 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

I love Cuban girls, but I hate this Cuban round((.

»
4 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

I hate Koa the Koala.

»
4 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

do you remember when codeforces had div1 ,div2 and div 3 it was very good days before they canceled div2

»
4 года назад, # |
  Проголосовать: нравится -27 Проголосовать: не нравится

The good thing about this contest series is tourist is back to 1!

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Should have had some div2 rated coders test this round too.

»
4 года назад, # |
  Проголосовать: нравится -11 Проголосовать: не нравится

Is this div2? The experience is very poor, the topic stem is too long, the language is not refined enough, and the author needs more exercise. Life has a dream, each wonderful. Don't see you again

»
4 года назад, # |
  Проголосовать: нравится +68 Проголосовать: не нравится

F was solved by 14 people, C by 18. Considering how many people (me included) read the problems in order, going by just the numbers, C was arguably the hardest problem in the contest o.O

Also, please make some algorithm/data structure problems sometimes. I'm tired of every problem being ad-hoc :(

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +23 Проголосовать: не нравится

    Yup, I wonder how this difficulty mismatch is possible with so many testers.

    Not every problem was ad-hoc. E is dp+DS (at least my solution is).

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +13 Проголосовать: не нравится

    87911622 for F is mincut/maxflow, does that count as algorithm?

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      At a glance F seems like it fits the mold. I guess it's more of an issue because algorithm/data structure tasks are usually some of the last problems, and I'm not good enough to regularly get all the way to them.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Well, you can just skip the other problems like I did. Score distribution is also weird af for this round so it's a sign that problem difficulty might be weird as well.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    That said, the solves are biased towards higher problems since they are worth more. If someone thought C was slightly easier than E, it would still probably make sense to go for E given that it's worth so much more.

»
4 года назад, # |
  Проголосовать: нравится +178 Проголосовать: не нравится

The problems order

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Am I really really stupid or was this round was tougher than usual (or both) ?

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

This round makes me realize how much I need to improve

»
4 года назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

After long time got his throne again !!

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Yet another unexpected Div 1 contest (for us Div 2 peeps) :)

Jokes apart, I feel that the questions were unbalanced. We saw the number of submissions for B1, B2 compared to C. Questions were more on the intuition side and getting the right logic. You would spend a lot of time to get the logic, and once you get it, its a few lines of code.

A was nice, but required a lot of thinking. Once you had it, few lines of code. For example 87878449.

A humble request to problem setters. Please make the contests more balanced. the questions are good and interesting, but the resulting rating changes don't perfectly reflect on the competitive coding abilities of a person.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    The submission you linked has about 10 LoC (excluding boilerplate) — I think that's reasonable for a Div2A. People were complaining about Div2A problems in the past that had 1-2 LoC solutions, something like print(int(input()) // 2)

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I'm not saying any of the questions were bad. A was a standard one. Just the placement of B and C could have been done properly. And yes, considering some of the previous contests, as you rightly pointed, length of A was good (10 LoC).

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Yes, the questions were good but were wrongly placed.

»
4 года назад, # |
  Проголосовать: нравится +27 Проголосовать: не нравится

»
4 года назад, # |
Rev. 4   Проголосовать: нравится -85 Проголосовать: не нравится

s

»
4 года назад, # |
  Проголосовать: нравится +56 Проголосовать: не нравится

My solution to C: assume that the solution is bitmask DP, write the most random bitmask DP you can think of, AC.

»
4 года назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

This round was challenging but good.

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

I'm not sure if the distributions are matched with the real difficulties.

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

I'm wondering how many people solved B div1 properly (without brute-force). I haven't, btw.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +10 Проголосовать: не нравится

    I don't understand what's improper about your solution. Even I did the same way.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    I figured out that we need to focus on the largest bit that occurs an odd number of times and when (number of elements with this bit 0, with this bit 1) = $$$(a, b)$$$, it's equivalent to $$$(a-2, b)$$$ or $$$(a, b-4)$$$. That leaves 3 cases to figure out manually.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Can you elaborate a bit on the equivalence?

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Basically, the first player can group together 2 elements where this critical bit is 0 or (2 and 2) elements where it's 1. Let's say that the 1st player took something. If the 2nd player takes one of the elements in a group, the 1st player can take the other; the critical bit of the XOR doesn't change.

        From this, we can directly see that $$$(a, 1+4b)$$$ is winning — the 1st player moves to $$$(a, 4b)$$$ and reacts until we reach $$$(0, 0)$$$ or $$$(1, 0)$$$ with the 2nd player's turn. With $$$(1+2a, 3+4b)$$$, the first player moves to $$$(2a, 3+4b)$$$, from that we reach $$$(0, 3)$$$ and since it's the 2nd player's turn and both have the critical bit 0, the 1st player wins. Seems the last case is losing.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Div1B has an easy proof of correctness. After you observed that you can split the input numbers into 2 groups based on the value of some bit, then you'll have to consider 4 cases depending on whether the sizes of these groups are odd or even. The proof itself is a bit too long to type :/

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +40 Проголосовать: не нравится

      I'm amused how you framed the answer, by telling the easy part (in my opinion) and omitting the part that I was actually interested in. It reminds me of some professors at university and their "proofs let as exercise for the reader", some of which they don't know how to prove themselves.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +8 Проголосовать: не нравится

        Let's say O — is the number with the bit 1, o — the number with the bit 0.

        In case OOOOOoooo (O = 5, 9, 13..., o = 2, 4, 6) you take O and then repeat the move of your opponent. In this case you get count(O)/2+1 which will be odd, so you win

        In case OOOOOooo (O = 5, 9, ... o = 1, 2, 5) you take O and repeat the move of your opponent. If your opponent takes the last o, then you will take O and force him to take another O after your move. So as the result you'll again get count(O)/2+1 and win

        In case OOOoooo (O = 3, 7, 11..., o = 2, 4, 6) the opponent will repeat your moves and you'll end up with count(O)/2 + 1 which is even and you lose

        In case OOOooo (O = 3, 7, 11..., o = 1, 3, 5) you take o and the opponent handles the previous case (where he loses) so you win.

        The answer

        if (((count(O) - 1) % 4 == 0) || count(o) % 2 == 0)
          cout << "WIN" << endl
        else
          cout << "LOSE" << endl
        
      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        If it is ever optimal for you to take a 0 rather than a 1, it will then be optimal for your opponent to do so (essentially saying “I don’t want to be the first person to take a 1”). So only the parity of 0’s matter when passing is optimal, and it will flip the answer if it’s odd.

        Then you can basically assume WOLOG that there are zero 0’s and get the answer from there. Going up to 5 1’s it should be clear that every group of two new 1’s that you add flips the winner.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +20 Проголосовать: не нравится

    It is a common insight in problems like this that if the players have some "pass" option available (in this case, taking a 0), only the parity of the number of passes matters.

    To see this, assume the number of available passes is even. If the second player would win in the position with no passes, then passing does not help the first player as the second player can simply pass back and eventually the passes will run out.

    If the first player would win in the position, then they just make whatever move they would make normally and the second player can't avoid the loss by passing (since they're now in the position of the previous paragraph).

    So all positions with even passes are equivalent to the position with no passes; by extension having an odd number of passes is equivalent to having one. Cases with no 0s are obvious, so now you only need to solve the original problem for when you have exactly one 0, which is hopefully a lot easier.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +32 Проголосовать: не нравится

Thank you for the interesting problems! Finally a not-too-easy div2.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится -7 Проголосовать: не нравится

Frustrating questions.. imagine how it would have felt if the submissions were at the usual rate lol

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    the first rule of an anton trygub round is to not forget that it is an anton trygub round

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится
»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

"and we highly encourage you to read all of them :)"

Imagine if you solve the problems according to their order.

»
4 года назад, # |
  Проголосовать: нравится -23 Проголосовать: не нравится

Extremely bad contest.Mike please tell them how a contest should be set so that everyone can learn and enjoy from it.I can't switch to other problems unless i solve the first one,because they seem to be way more harder by looking at successful submissions.Hoping for a good contest from good problem authors and testcase seters.These new guys should be trained.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

i dont know but even after all the difficult problems why pretest of even A were weak... solved just 1 and that also got wrong test 32....

»
4 года назад, # |
  Проголосовать: нравится +87 Проголосовать: не нравится

Awesome problems :) Thank you, Devil et al, for this contest.

But I have a question to cf admins and coordinators: do you ever read Russian statements before the contest? They are awful almost every round.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

div2B statement was not bad but rather it was too long I panicked after seeing the statement, I would have solved it if I didn't panic but still, this contest gave me the highest rating delta.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +29 Проголосовать: не нравится

Yeah, problems were hard, but not bad. Yes, it's true that it's not easy to visualize the hard version of div.2 B. But when you can, you may think that it's nice after all. At least, I have the feeling during the contest! :)

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +16 Проголосовать: не нравится

Even the stories(which were very long) used in the problems were boring.

»
4 года назад, # |
  Проголосовать: нравится +92 Проголосовать: не нравится

This contest reminds me of the round #657 :(

PS

Despite the difficulty, the problems and ideas are great though :D

»
4 года назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

This round wasn't interesting to me :( . During the contest, I was confused if I entered in the Div1 section :( . Overall, I got my lesson for improving me..........& yep, the writer of the contest has an interest name related to the situation of this contest. -_- .

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Well guys what did you expect? The contest was set by Devil himself.

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Contribution rating of this contest is falling faster than my ratings.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Now Need Quick Editorial :(

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I don't know what these div2 rounds are, but definitely not the same as they used to be. In the past D or E was of the same difficulty as this round's B ...
And div2B was more difficult than div1A, so it is tecnically a div1 round for div2 participants. Let's delete divisions, at least then someone would know what to expect.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

This round was very different from typical Codeforces rounds. I think the clarity of statements and difficulty for B1 and B2 should have been handled better. The pretests should have been stronger than this. It's been a while since I have seen so many failed system tests. I am not sure whether it is intended but I am not a huge fan of it.

»
4 года назад, # |
  Проголосовать: нравится +50 Проголосовать: не нравится

 )

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Weak Pretest for Div2 B1, I wrote a solution for Div2 B2, got wrong answer verdict on test 2, but same solution passed pretest for B1.

»
4 года назад, # |
  Проголосовать: нравится +126 Проголосовать: не нравится

To not keep you waiting, the ratings updated preliminarily. In a few hours, I will remove cheaters and update the ratings again!

»
4 года назад, # |
  Проголосовать: нравится +16 Проголосовать: не нравится

According to CF rating predictor, tourist will be again first in rating table

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Tbh, I don't see how people are comparing today's div2 with div1. I agree the order of the problems was a little messed up. But the difficulty was still of a div2.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Div2B's rating was completely skewed and definitely much harder than a typical B. Having such a hard problem worth so little steepens the curve of the entire round. It IS harder than a typical Div2 because there are less easier problems.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      That's what I said. Order of problems was messed up. Apart from that, A and C were pretty normal for a div2. So was B, apart from the fact that it should have been placed higher. So I think the problems weren't that difficult. But again maybe it is just me.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +3 Проголосовать: не нравится

        Yeah the main problem was the rating distribution but what I'm saying is that by setting the distribution improperly, the entire round becomes more difficult.

        Problem B was problem the equivalent of C-D The other problems were relatively appropriate

        So instead of a round with problems of difficulty A-B-C-D-E-F you get A-C-C-D-E-F which is definitely harder

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится +1 Проголосовать: не нравится

          Agreed. But I guess every once in a while you get a slightly harder contest than usual.

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится +5 Проголосовать: не нравится

          I think B1 was very straightforward. Not the same about B2.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

please Devil atleast increase the score of B1 and B2 because it is much harder than c

»
4 года назад, # |
  Проголосовать: нравится -30 Проголосовать: не нравится

Sorry to say, but this contest was a failure. Hard A with just 6k submissions. Weak pretest of A. Multiple solutions failing on Test 32.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +9 Проголосовать: не нравится

    You cannot judge a contest by only problem A. You didn't reach other problems so it is your problem.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится -14 Проголосовать: не нравится

      Maybe, I lack in skills to solve C. But still submissions are evident of B1 B2 and C. As many as 1100 solutions of A failed in main test. Something is really wrong.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +4 Проголосовать: не нравится

        Normal. I remember in the old days where multi testcases did not exist a lot, tons of people were getting hacked. Oh and also, C was considerably easy. Maybe B1 and B2 were a bit heavy, but they were so good and not trivial. In fact, I think what made it hard its because it is non-trivial. For me, I felt it was not that hard. But difficulty depends from person to person.

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится +1 Проголосовать: не нравится

          Agreed. C used to be so much more difficult. I think it was just the order of problems that was a little messed up. Otherwise, it was a nice contest.

»
4 года назад, # |
Rev. 3   Проголосовать: нравится +3 Проголосовать: не нравится

This round was definitely not like regular div 2 rounds!

»
4 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Nice round. Awesome A

»
4 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

If the no of submissions in a rated contest are very low ~5000, is it advisable to submit a wrong solution intentionally to get an increase in rating ?

  • »
    »
    4 года назад, # ^ |
    Rev. 5   Проголосовать: нравится 0 Проголосовать: не нравится

    You cannot actually(i.e ignores new-rating-bonus) increase your rating if you solve $$$0$$$ problems, except your rating is low enough (I think, $$$<0$$$)

    A newbie would lose more than $$$50$$$ rating if he didn't solve anything.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +13 Проголосовать: не нравится

      Solving $$$0$$$ problems means: being beaten by contestants who have positive score, tying with those with $$$0$$$ score, and possibly beating one or two clowns who made umpteen unsuccessful hacks to get negative score. If there are sufficiently many people with $$$0$$$ score and your rating is sufficiently low this might be better performance than average predicted based on your rating.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Please help me guys. I am getting runtime error https://codeforces.net/contest/1384/submission/87927572

»
4 года назад, # |
  Проголосовать: нравится +56 Проголосовать: не нравится

Thanks for the nice problems.

BTW, does anyone know how to hack this solution? It's just Dinic $$$\times 2^K$$$ but fast on current tests.

»
4 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

I think, B1 and B2 (div2) were so hard for this positions

»
4 года назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

So who was the target participant of this round? Tourist?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

They said "read all problems" :- We should have focussed on it more at that time!!!

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Back to pupil...T_T

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Just don't know am I that degraded or also tilted for WA2 in A?
Nice C/D. B really need some image instead of text notes.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +6 Проголосовать: не нравится

lol this is so disappointing for me , seeing people who solved only A below me by ~500 ranks, and those who solved only C above me by ~500 , and i wasted most of my time to solve 3 problems and gained nothing.

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

    so basically my rating change would have stayed almost the same if i didn't even read B1 and B2 since i solve A quickly.

    edit: a problem solved by only 300 people during contest is worth nothing.

    just complaining to put it off my chest.

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

    This is very sad for codeforces. It seems that the setters can not come up with unique problems anymore, so they always divide the problems. C should have been <1500 and B should have been a solid problem having >1750 points

»
4 года назад, # |
  Проголосовать: нравится +24 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Can someone explain how to solve 2C.string transformation 1,

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    For me,the main observation was that if you need to transform an 'a' to 'c', and also a 'b' to 'c', it is more profitable to transform 'a' to 'b' first.The implementation part is quite easy actually. 87893559

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Key idea :

    Spoiler

    Why so ? Because, even if you change it individually, a->b and a->c it is going to cost you 2 operations, but if there are more b->c conversion then changing both of a's to b will help. - So, How to generalize it ?

    Spoiler

    Implementation of this idea

    87877844

»
4 года назад, # |
  Проголосовать: нравится +41 Проголосовать: не нравится

"Some" people just cant be satisfied with any contest.. When there's an easy contest, people say too easy div 2, div 2 C was very easy, more like a div 3 contest etc. etc. when there's a tough one, they are like div2 was like div 1, very unbalanced contest, bad problems, and make memes about it.. when there are ad-hoc problems they start targetting the coordinator that we want dp problems, data structures/algo problems etc. etc. when there are, people again start whining about the difficulty , say problems were shitty, etc. etc.

P.S. i'm glad we are getting regular contests on CF and every contest teaches something...

(awaiting downvotes)

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Feel I'm so stupid that got hacked on Div.2 A.lol

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

My profile picture depicts my condition after this contest !

»
4 года назад, # |
Rev. 2   Проголосовать: нравится -8 Проголосовать: не нравится

.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +24 Проголосовать: не нравится

    wasn't much of a hard work then ig, if you lost it in 1 contest.

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

      .

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +28 Проголосовать: не нравится

        Then how is it lost in 2hrs? You still know coding and your problem solving skills have probably increased.

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
          Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

          .

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится -16 Проголосовать: не нравится

          For someone who is Candidate Master, you still act pretty dumb. Since so many people are complaining, don't you think it makes sense that TriumphantEggplant lost so many points. Its kinda sad that a newbie understands this more than a Candidate Master.

          • »
            »
            »
            »
            »
            »
            4 года назад, # ^ |
              Проголосовать: нравится +4 Проголосовать: не нравится

            Thinking so much about rating is useless. One bad contest's rating is anyways nullified after 4-5 normal contests anyways. What really matters is what you learn.

            And yeah of course it is fine to be sad after a bad contest (I also messed up today on B) but my point is your hard work isn't really wasted with one contest.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +26 Проголосовать: не нравится

    Don't worry and don't think of rating like that.

    If you deserved that rating, you will have it back in a few contests.

    If you didn't deserve that rating, you would have soon lost it anyway.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    It's very discouraging to lose rating, but it's just a number honestly. Some contests are good, some are bad. What's important is that you can solve problems now that you couldn't have solved before. Just keep practicing and your rating will come back :)

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Thank you for this very nice round ! I enjoyed the problems although pB story was too long to read

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I thought that for tourist, mike should create another level of legendary grandmaster

»
4 года назад, # |
Rev. 2   Проголосовать: нравится -74 Проголосовать: не нравится

antontrygubO_o thanks for this amazing contest. You're doing a REALLY great job at making more and more absurd contests. GG.

Why was it absurd:

Aside from HUGEA-- statements and weak pretests, the order of questions was stupid, difficulty was not appropriate. I think you really need to look back and think what you're doing wrong instead of trying to defend yourself.

PEACE.

PS: The problem setters are to be blamed equally.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

back to 666 contribution XD

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

I like Cuban cigars and rum, but not contests...

»
4 года назад, # |
  Проголосовать: нравится +29 Проголосовать: не нравится

Funny how it's been an hour and no one has posted Any Video Editorial Link For Div2C/D Yet.

»
4 года назад, # |
  Проголосовать: нравится +23 Проголосовать: не нравится

This is my personal opinion, I think the same problem should not be divided into two parts (lowering difficulty in one part). Or maybe the point for the harder version should be much much higher than the easier version. The reason follows,

  • The points keep deducting from both the version simultaneously.

  • Let's say, one person solves both the versions separately. Sometimes it occurs as if the solving methods of the versions are completely different. One has to rethink more deeply for solving the harder version. It can take longer than the easier one. But the result is not sweet sometimes. Because for wasting so much time for solving the easier one, a lot of points have been already deducted from the harder version.

  • Now, if someone wants to solve both the versions at once, there is a huge risk factor. And even if they manage to solve the harder version first, they can't gain as much point in the easier version as those who have solved only the easier version quicker. It is expected that the harder version will take more time to be solved, so they will obviously gain less point in the easier version than others. If the point in the harder was much much higher, then it wouldn't be a problem.

  • If I have to say more clearly, then basically the harder version needs a harder thinking process, needs more time to solve. But most of the time the harder version has a lesser point than the easier one. Why? It's not like the easier version always helps in the harder version, absolutely not. Most of the time, you can consider the versions completely different on the basis of their solution.

Sorry for being too long. Maybe I am missing something. Let me know what you think.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    we're in the same position, basically the same problem i had in the comments above.

    the rating distrubution for the problems feels unfair, one could argue that b1 is much harder than C , and b2 is much harder than b1 , yet both b1+b2 < c rating by 500....

    very disappointed by this, had i not wasted the time on it , i would have easily solved C which is quite simple but i got nervous having no time left.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +13 Проголосовать: не нравится

    Whatever the conditions are, the contest is fair to all the participants since all of them are in the same conditions.

    All the things you describe don't give anybody an unfair advantage, they just add some strategy element to the contest.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +1 Проголосовать: не нравится

      a fair point , but strategy is all based on the points , seeing that B1 is 1250 points less than C , and the harder version is less by 1000 , after reading B1 anyone would think if you can't solve B1 then you won't solve C.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      this problem is caused by the ratings put by the problem setters.

      with your argument it should be ok to have F in a contest with 3000 points to simply be print a+b.(extreme exaggeration ofc)

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Yes, I think it should be ok. Can you prove the opposite?

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          can't find a valid argument on my side to be honest,but i just personally think the problemsetters made a mistake with the ratings which caused the standings to look like a mess.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      I agree with you, but not completely. Maybe it doesn't provide an unfair advantage to anyone intentionally, but it lets the fate to decide who is better. For example, let's say one guy starts to solve B1 first since it should be the optimal strategy. But imagine that day B2 was not that hard and it may take almost the same time as solving B1. So, on that day whoever started to solve B2 first got 'lucky'.

      So, the next day, the same guy started to solve B2 at first, But this time the condition was like today, where B2 is much harder than B1 (and obviously C). And also today he was 'unlucky'?

      What's the point of point distribution then? Let's make the contest as per the rules of ICPC or of educational rounds.

      You are right, CF doesn't provide any disadvantage to anyone intentionally. But it certainly deceives some contestants unintentionally.

      There was no strategy today, but only deception.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Another way to look at it is that such problems give you more options. Once you've read the problem statement, you can then make a choice on which version to solve. You can either solve the easy version and treat it as a problem A, or the hard version and treat it as a problem D. I would not go in with the intention of solving them separately.

    The problem with Div2B this round is that the score distribution and positioning is bad, and that's specific to this round. If the points for Div2B was same as Div2C and Div2D, then I think it would be reasonable.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      And there is the catch. Even if you can think it as problem D, the outcome will not be the same. Because points will be deducted from both the versions. And most of the time harder version has a lesser point than the easier one. So thinking it as a D doesn't cover up the loss.

      I am not against the breaking down of problems. Rather I think harder versions should be more valued than the easier ones.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        The deducting of points is percentage based. So if you add up the total points from the easy and hard versions, they will decay at the same rate as a single problem which started with the total score of the 2 versions.

        Someone who just solves the easy version might solve it faster, but it's worth less points anyway. It's like complaining that less points are deducted when someone takes 10 minutes to solve A than when some takes 40 mins to solve D.

        In this contest solving the easy version is 500, while solving the harder version is 500+750=1250. Maybe the points should be higher when comparing to Div2C/D, but I don't see a fundamental problem here.

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          you have just said the point should be higher comparing to C or D. And that is exactly I am trying to say. Now you certainly don't want the easier version to have more points than now. So the harder version needs to be valued more. And keep in mjnd that when you think the problem as a whole, there is a huge risk factor involed, but the gain is very low

»
4 года назад, # |
  Проголосовать: нравится -40 Проголосовать: не нравится

Time for antontrygubO_o to resign. What a disaster.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Has anyone successfully implemented DIV2 C using a graph ? I tried but it didn't work out.

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

    I solved it using DSU but before that, I implemented it using graph but get WA.
    DSU submission https://codeforces.net/contest/1384/submission/87914752

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +1 Проголосовать: не нравится

      accesss_denied What was your approach? Can you please explain in brief?

      • »
        »
        »
        »
        4 года назад, # ^ |
        Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

        First I check the condition of string A any characters are greater than string B then we print -1 else answer was possible.

        If the answer is possible then we have to minimize the operations then I match the characters of string A to string B at the ith position. - if the same character occurs then we have nothing to do - if both strings characters are different at the ith position then I find the parent of both characters in a DSU. If the parent of both characters are same then we know we can change this character by directly changing it or indirectly then we did not have to use any operations. If the parent of both characters are different then we have to add s1[i] to s2[i] in DSU which shows these two characters are also interchangeable and increment our answer by 1. After processing whole strings we have our answer.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Just make an edge between characters in the same position between string a and b. If at any point char in a is greater than char in b, it's not possible to convert. With the formed graph, treat it as an undirected graph. Then you at least need sz - 1 edges in each connected component for the conversion. Sum that up in all components and that's the answer.

    87904929

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

      yaswanth I don't quite get the intuition behind this? Like, how did you get to this? And why does that work? I get this idea that we need to find the minimum spanning tree(taking all edges' weight as 1) for our original directed graph(but there's an issue in it). But I do not get it that how making the graph undirected solves our issue?

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +4 Проголосовать: не нравится

        Here's the intuition:

        • We are only creating directed edges from smaller to bigger characters. This will create a DAG (directed acyclic graph). Possibly multiple DAGs. Let's consider one of them.
        • Keeping MST stuff aside, let's see what we want here. We want to be able to perform all possible conversions (edges).
        • We want to reduce the total number of conversions while at the same time perform all of them. Imagine there's an edge from u => v. In other words, we want to get from say node u to node v after removing the edge u => v. Which is only possible if the graph is still connected isn't it? You can't reduce the edges less than that. If you do that, at least one of the conversions will not be possible.
        • The minimum number of edges to keep a graph connected is nodes - 1, basically a tree.

        The assumption about treating the graph as undirected is not required. All the above points apply for the graph in question too. I only treated it as undirected graph to make things easier.

        If you think about it, the graph is a DAG. You can only get from smaller chars to bigger chars and there might be multiple ways of doing it. Let's take a graph like a => b, b => c, a => c. We want to eliminate all the possible ways and keep only one way. I just made the graph bidirectional (undirected) to detect the multiple ways easily. Now all the other multiple ways are kind of back edges right? It'd have been wrong had there been a cycle in the initial graph. Coz there's no cycle, the only cycle by making the DAG undirected is going to be an additional multiple way.

»
4 года назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

Div 2 contests should have atleast one problem which is relatively easy for even lower rated contestants because it sets the momentum during the contest. It was very depressing to get wrong submissions in the first problem itself. Overall I felt the contest was interesting but some aspects need be worked on. I think everyone should cut some slack for the setters because they are inexperienced currently. They are only going to get better. Well done, Devil and team.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +8 Проголосовать: не нравится

    You can always solve problems in practice (10 mins before start of the round) to build momentum.
    Come on. Come up with a better reason.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +22 Проголосовать: не нравится

      aryanc403 I understand that upsolving problems before the round helps build momentum but the bigger issue I felt was that even Div2 A was tougher than most Div2 contests given that it was for 500 points, Div2. C had almost 3x submissions as Div2 B1. That clearly shows that the problems should have been ordered better. I ended up +63 in spite of solving only Div2 A and Div2 C even though those who solved Div2 B1 clearly solved a much harder problem.

»
4 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

This contest gave me the highest rating change in my whole life. Still solved only two problems.

»
4 года назад, # |
  Проголосовать: нравится +27 Проголосовать: не нравится

Accidents like this would happen if there is no tester with rating below 1900.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    Lots of red people have <3 problems solved. What 1900??

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится +8 Проголосовать: не нравится

      I commented for div2 difficulty level It's no big deal for lots of red coders (as they are well experienced) to solve <3 problems, but for div2 people, it should be balanced as it is the majority in participating in contests, and neither they are well experienced to deal with problems like red coders. If there were two testers with rating 1700 and 1500, then they could have suggested the overviewing of difficulty of div2 contests

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      Tbh I'm interested in knowing how many testers managed to solve Div1 C.
      Generally, the order is decided by looking at the performance of testers in virtual participation.

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    As far as div 2 testers are concerned. Most of them whom coordinators can trust want to participate instead of testing. That's the reason for 1000000 orange testers and almost 0 purple in div2 rounds.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Hello guys. I found different results in Codeforces IDE and my own pc's IDE with the very same code for problem A.

If you run the following C++14 code in both your pc and in CF's IDE you will get my point https://pastebin.ubuntu.com/p/F8BJvpVd4Q/?fbclid=IwAR1tmO_ZOxMt8lx9l3lSTRpLFzqzMgfkE15Xysz0xz7Aq3uoLUeKyVbwsg8.

Sample Inputs-

https://pastebin.ubuntu.com/p/Kvs8c52tqJ/?fbclid=IwAR1XKcjhr9_DwoRH0roeL7lGR_79oWRw8640Tnhumr98Y8gEw4sYjjpa_4o

Is there anyone to help me out on the reason?

»
4 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

seems like.. Mike bhaiya found the solution of avoiding excessive users :D

»
4 года назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

Don't demotivate the writers. They did a very big mistake but I am pretty sure after such round this mistake will not be repeated. Yes problems were hard for div 2 and some problems like B were too lengthy to read.
I guess there are two groups of people who would take a lesson from this. One is writers and other is contestant.
As a contestant I learned that problem selection is too critical. For the first time I read all the problems during contest. I actually gave a shot to C before B and also gave a shot to D before B.
Second thing is when you feel like this contest is not well suited to participants, then it would be normal to get WA and even no solution at all. In this situation just try to read problems. Work on problem that you feel like it is possible to think of a solution. No matter if you solve only one problem during the contest. Even though you will get reasonable amount of rating change as the contest was more likely to not to suit the contestant.
I am not much experienced competitive programmer and also I am not worthy to be expert right now in my ratings. Infact I can't even stabilize the huge amount of rating plus I got in this contest but still honestly I think there is no point in criticizing the authors.
And for those who lost their rating, they will climb back in next contest as there would be a massive drop of rating in next contest to those who get higher rating this time. For example, Me. I got rank of around 691 but I don't think I would be able to do it for next time based on my current experience.
So just chill. Don't worry about rating they will be back if you perform good in next round.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    I agree, it wouldn't have looked that scary if order was A -> C -> B1 -> B2. Kudos to the problem setters for such a beautiful set of problems, just ordering could be better next time :)

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

I solved that error.

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Why are not people discussing how to solve questions, i generally try to go through comments to find interesting approaches. Today i don't seem to find any.

Can someone please explain how to solve div-2 E ? Thanks in advance.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

how to solve div2B anyone ??

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How to solve Div 2- B1 and B2? Can somebody help?

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

For Div2 B1 problem, for 7th input, 2nd testcase Jury's answer is 'No'.

test case is:

27 29 16

0 0 0 0 0 0 0 0 0 0 0 0 0 6 6 6 6 6 6 6 6 6 6 6 6 10 10

If we start from t=42 i.e. t=43 for first element, we can cross the sea. Can someone explain me.

»
4 года назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

Very Bad storytelling in div 2 B1 & B2. It's not good to feel like the director of a movie while writing the problem statements.

»
4 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

My real ranking is 217, but the rating change is based on 434. How to solve this problem?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Well,hacking phase rust in recently Div.2 round till the 32nd test case of A put forward in this round... In my opinion,I have no idea about the distribution before the round and things getting worse when I solve the problems. Apart from the distribution,still a good problemset~:)

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Does anyone have a proof for the following greedy for Div2C/Div1A? It gets AC but I do not fully understand why.

First ignore all locations at which the two strings are already equal.

Find all the A's and try to increase every single A, by as much as we could (up to the point where we will exceed a character in the second string).

After this, there should not be any more A's in the string (after ignoring equal locations).

Do the same thing with B's, C's, and so on, ignoring equal locations each time.

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится
  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +1 Проголосовать: не нравится

    Proof by matching lower bound. Let X be the set of characters that need to be changed at some point i.e. X = {character c | there exists i such that c = A[i] and A[i] < B[i]}. Any solution needs to do at least |X| operations. The greedy algorithm operates on each character of X exactly once, so it does |X| operations, so it's optimal.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

In problem Div2-C, the tags are dfs,trees and dsu. My solution uses greedy. I am not able to prove it and wondering how it passed the system testing also. Can anyone uphack it or prove it? Thanks in advance.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +2 Проголосовать: не нравится

    This greedy solution works for a reason. I came up with same solution.
    What you are doing is that you are traversing from a to t and along the way you are changing the value to the leat possible conversation to be done for that character.
    Suppose there is character say c and all its occurences are with characters say d,f,h,r,t so now you are converting all c to d, which is least possible conversation. Then with d you convert to next characters and so on. Eventually you will reach t at some point which will not have further conversations. So this is why your solution works and so does mine.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Question : C2 Koa and the Beach
Can someone explain why the below test case below should have "NO" as a answer:
20 26 32
31 27 14 7 2 23 22 21 19 27 31 12 23 31 0 11 28 20 31 30

»
4 года назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

Problem A: Getting Wrong Answer for test 2 14th test case which is

3

0 1 1

my output:

aaa

baa

bba

baa

It says "wrong answer Words 1 and 2 have lcp 1 not 0 (test case 14)".

I have count to the 14th test case multiple time but can't find why am I wrong. Can someone explain to me?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    Your last submission — 87935568
    elif res[-1][i+1] == "a": looks wrong. I will leave on you to find what is an issue here.

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

    I think this is your output.

    baa
    bba
    baa
    aaaa
    

    now you can see yourself the error. I actually counted the output and your 14 output was this one.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I was saved by problem C

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

I wonder to see that many people keep an alternate account to show their anger. They should have the courage to show up their own account. All people related to the contest try hard to present a good contest, we should not discourage them or be angry to them. We can suggest our opinion in good manner.

»
4 года назад, # |
  Проголосовать: нравится -19 Проголосовать: не нравится

unrated?

»
4 года назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

My screencast, ABE and then trying to solve D https://www.youtube.com/watch?v=rBgnvmd9Qak

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Yeah we read all the problems as you highly encouraged.... >:(

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

WA3 во время раунда 87909222

AC после того как узнал ошибку 87941869

ошибка из-за того `int a[205000]; .... `for (int x : a)` `{` `..` `}`

заменил цилкл на for (int i= 0; i < n; ++i) в результате AC! !

»
4 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Hey I participated in the contest and rating change was also reflected but now my rating is reverted back and site isnt showing that I participated! Is it a bug?

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Is the rating temporarily rolled back? Or it became unrated

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Have the rating changes been rolled back? My rating increased after this contest and seems to be back to where it was before.

»
4 года назад, # |
Rev. 2   Проголосовать: нравится -23 Проголосовать: не нравится

[deleted]

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +4 Проголосовать: не нравится

    A hard contest just motivates you to increase your level.

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

      I think.I have missed a point. First one really motivated me and until the system testing last one also. When I solved at least one problem in each contest. But after the system testing I saw that pretest was so weak in the last contest.And this demotivated me.If pretest was strong then I could debug it.I thought my code was right.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Strong pretests might not be a mandatory feature of a good contest. If every time pretests are strong there hack will become lie. Since there is something called hack then pretests might be weak sometimes so that people can hack.

        Also short statement might not be a mandatory ask for good contest. Solving problems with big statement is also a skill which one should practice.

        But making B harder than C,D due to boring statements is not a good practice i think.

»
4 года назад, # |
  Проголосовать: нравится +24 Проголосовать: не нравится

Actually I'm confused. Why did this contest get such negative comments ._.

I've only played very little rounds so I still don't know how to judge if a contest is "good" or "bad".

Thanks~

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Very demotivated after reading the statements of this contest. Was thinking about stop participating in contests for past few days. This contest showed me I need to stop taking part in contests now and learn new things.

Adios Guys for next few days!

»
4 года назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

I think 2 bad contests (in terms of difficulty levels and somewhat otherwise, like weak pretests) when most of the testers were red somewhat indicates that it is difficult for the reds to gauge the difficulty of the problems that are much easier for them. It is obvious but it still needs to be said as these contests could have been much better with the right problem order. The problems were so good, just the right order would have made the contest awesome.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Please chose testers wisely, as for me C and D were relatively easier than B2. People lost there rating because of the incorrect score distribution. For Div-2 please have some <1900 raters also for testing.

»
4 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

Although I'm a beginner, but div 2 was a bit challenging. The problems gave me a hard time.

»
4 года назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

Why is the calendar showing codeforces Round 659 Div.1 on 25th that is today, everybody knows it was yesterday (https://codeforces.net/calendar)

»
4 года назад, # |
  Проголосовать: нравится -8 Проголосовать: не нравится

tourist

»
4 года назад, # |
Rev. 2   Проголосовать: нравится -8 Проголосовать: не нравится

Can we get to know the problem rating mechanism? I wished to know how is Div1 B1 equivalent to Div2 D, just out of curiosity. (In contest submissions for Div2 B1 ~ 800, Div2 D ~ 150, Div1 B ~ 950).

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Love Cuba from VietNam <3