Monogon's blog

By Monogon, history, 3 weeks ago, In English,

Hello, Codeforces!

I'm very glad to invite you to Codeforces Round #658 (Div. 1) and Codeforces Round #658 (Div. 2). This contest will take place on Jul/21/2020 17:35 (Moscow time). In both divisions, you will have 2 hours to solve 5 problems (and one subtask). The score distribution will be announced closer to the start of the round.

Huge thanks to:

I've worked hard to ensure the pretests are short and the statements are strong. Remember to only read the problems that you can solve, and may you have the best of luck!

Because I know you all have so many questions, I have compiled an FAQueue

  • Q: Is it rated?
  • A: Yes

UPD Here is the score distribution:

Div. 2: 500 — 1250 — (1000 + 1000) — 2250 — 3000

Div. 1: (500 + 500) — 1500 — 2000 — 2500 — 3000

UPD Editorial

UPD I filled in the answer to the FAQ. Also, congrats to the winners!

Div. 2:

  1. badger_champion

  2. Mai_madarchod_hu

  3. rulai

  4. Vimmer

  5. niynip

Div. 1:

  1. Benq

  2. Um_nik

  3. KAN

  4. Petr

  5. ksun48

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

»
3 weeks ago, # |
  Vote: I like it +660 Vote: I do not like it

As a tester, give Monogon contribution.

»
3 weeks ago, # |
  Vote: I like it +493 Vote: I do not like it

As a tester, contest is bullshit.

Reference: https://codeforces.com/blog/entry/76777?#comment-613713

»
3 weeks ago, # |
  Vote: I like it +23 Vote: I do not like it

As a tester, I recommend reading FAQueue

»
3 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

So many questions and so few answers...

»
3 weeks ago, # |
  Vote: I like it +56 Vote: I do not like it

(and one subtask)

»
3 weeks ago, # |
  Vote: I like it -69 Vote: I do not like it

Hope we don't encounter statements like Unrated and ruined, Upset and demotivated from mike.

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

Please use original FAQueue . Don't change.

Spoiler
  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it +84 Vote: I do not like it

    So this dude's pc is filled with screenshots I guess

    • »
      »
      »
      3 weeks ago, # ^ |
      Rev. 3   Vote: I like it +28 Vote: I do not like it
      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it +73 Vote: I do not like it

        Is this picture even relevant as reply to my statement or you just used it to prove that we are too dumb to understand xD

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

        Its like Div2 F for me, can you please explain this image

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

        "Ending racism by going vegan"

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

          False.

          Spoiler
          A picture is worth a thousand words
»
3 weeks ago, # |
  Vote: I like it -53 Vote: I do not like it

»
3 weeks ago, # |
  Vote: I like it +304 Vote: I do not like it

When you realize that Pretests are short and Statements are strong. ;-;
![ ](dd0)

»
3 weeks ago, # |
Rev. 2   Vote: I like it -63 Vote: I do not like it

Gonna be an amazing contest.

»
3 weeks ago, # |
  Vote: I like it +52 Vote: I do not like it

Remember to only read the problems that you can solve New thing in the announcement

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

    what did he mean by this ?I can't get it

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

      Then you shouldn't have read it.

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it -14 Vote: I do not like it

        Apparently it's to lessen the server load on cf

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      usually they write:read all problems even last ones but "Remember to only read the problems that you can solve " is a joke about it

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

Hope to get some relief after the deadly Div2 round #657.

»
3 weeks ago, # |
  Vote: I like it -44 Vote: I do not like it

Meanwhile

»
3 weeks ago, # |
  Vote: I like it +118 Vote: I do not like it

As a participant, I can ensure that good coders will have increased rating at my rating's expense. ;)

»
3 weeks ago, # |
  Vote: I like it +104 Vote: I do not like it

did I read it right?

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

Why not this? (it's more accurate tbh)

Huge thanks to DeadlyCritic for being useless, and doing nothing, and not helping with problem in any kind.

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

    Don't be so hard on yourself. It would be difficult to write good test cases without someone to fail all the problems.

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

      I ruined your unrated round, now it has non-zero chance to be rated, I'm so sorry about it. =(

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it -27 Vote: I do not like it

        Don't reveal that contest is unrated, only testers should know that (for now)

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it -12 Vote: I do not like it

    ????????????????????????????????????

»
3 weeks ago, # |
  Vote: I like it +25 Vote: I do not like it

Where's the Monogon Platform?

»
3 weeks ago, # |
  Vote: I like it +77 Vote: I do not like it

As a tester, this contest is unrated (for me).

»
3 weeks ago, # |
  Vote: I like it -77 Vote: I do not like it

As an astrologist, I predict long queues again. XD

»
3 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

getting a hunch that this one is going to be one hell of a ride or maybe 567 is still haunting me who knows

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

    I think the previous round got into your head just too much that you can't even remember the Round number correctly!!
    #Round 657

»
3 weeks ago, # |
Rev. 2   Vote: I like it -15 Vote: I do not like it

Older guys, please tell me if Mike Mirzayanov cares about mentions in comments

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

"Remember to only read the problems that you can solve"

»
3 weeks ago, # |
  Vote: I like it +282 Vote: I do not like it

Isn't it true Monogon ?

I-Do-One-Push-Up-Meme-Template

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

    You know it’s true because his face matches Monogon’s profile picture

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Such a great FAQ!!!

»
3 weeks ago, # |
  Vote: I like it +151 Vote: I do not like it

zeoob.com_6boo0qgal9_photo.png

»
3 weeks ago, # |
  Vote: I like it +45 Vote: I do not like it

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Finally, Monogon is back!

»
3 weeks ago, # |
Rev. 2   Vote: I like it -40 Vote: I do not like it

Hello, I got quetion, in the problem D the test case include el case asdfghjk and the answer is 7, but the answer but the answer shouldn't be 6?. The string of the answer would be ddddgfee

sorry, ignore me, I was wrong about competition blog

»
3 weeks ago, # |
  Vote: I like it -20 Vote: I do not like it

Codeforces is very good!There are three to four competitions a week!

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

what does a short pretest mean? Less tests or just easier pretests? edit: sorry if im misinterpreting something or if theres some nuance but it would be really helpful if someone could answer instead of just downvoting

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    "short pretests and strong statements" is a joke, it should have been "strong pretests and short statements"

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

I've worked hard to ensure the statements are strong

Don't tell me it's 2 hours of thinking for 4 lines of code..

»
3 weeks ago, # |
  Vote: I like it +2 Vote: I do not like it

all they are attempting to do is demotivate contestants and cause fewer people to participate

»
3 weeks ago, # |
Rev. 2   Vote: I like it -26 Vote: I do not like it

[Deleted]

»
3 weeks ago, # |
  Vote: I like it -67 Vote: I do not like it

I'm very sorry to say but this round is going to be unrated

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

This month is already a disaster(in terms of our heartbreak during contests). I hope this contest will conduct smoothly. All I want to not see that popup message from mike! Let's hope for the best

»
3 weeks ago, # |
  Vote: I like it +28 Vote: I do not like it

Wow, Monogon is this you?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thanks. I can't believe you made me waste my time watching yoyo videos on Youtube

    • »
      »
      »
      3 weeks ago, # ^ |
      Rev. 3   Vote: I like it +24 Vote: I do not like it

      communicating in internet is tough

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

        Bruh!

        It was about me watching anything. not blaming you. I found yoyo weirdly satisfying and ended up watching for like 30-60 mins xD (some 3A, 4A finals and stuff). It was a joke and wasn't blaming you, was instead thanking you lol.

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

          Ok, I got it now, sometimes it's hard to figure out the tone of the voice in a internet chatbox :v

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

            As someone rightly said :-)

            "communicating in internet is tough"

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I found another one, by Eva. I'm not 100% sure if both they are same, although they look same and have same name.

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

      eva can u plz confirm this?

    • »
      »
      »
      3 weeks ago, # ^ |
      Rev. 2   Vote: I like it -16 Vote: I do not like it

      Does it matter? I won't be surprised if I get to know that the real person behind Eva is a male. Who knows maybe he got crush on this singer Eva Krauze and made an account in her name.

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

        Why have you created a new account to say this

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it -26 Vote: I do not like it

          Isn't this obvious? Ms/Mr Eva

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

            It's not obvious for me. Once again, why do you need a new account?

            • »
              »
              »
              »
              »
              »
              »
              3 weeks ago, # ^ |
                Vote: I like it -11 Vote: I do not like it

              coz I forgot password of my original account

              😏

              • »
                »
                »
                »
                »
                »
                »
                »
                3 weeks ago, # ^ |
                  Vote: I like it 0 Vote: I do not like it

                Why haven't you, grammar Nazi, corrected "obvious to me"?

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        still eva's personality is kindda cool.

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          What's cool about his/her personality?

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Is that the old version of TikTok?

»
3 weeks ago, # |
Rev. 4   Vote: I like it -40 Vote: I do not like it

Great contest

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

What is mean by one subtask?

»
3 weeks ago, # |
  Vote: I like it -10 Vote: I do not like it

constructiveforces!!!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope for a challenging round despite the toughness of the previous one!

»
3 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

Hope to become a master after this round.

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

Reading the blog, this looks to me a very different contest than usual. Really excited for this one!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Monogon how many shared problems will be?

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

    div2(C+x) = div1(A+x), so 3 shared problems.

    The subtask is on div2C = div1A, so it is also shared.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it -15 Vote: I do not like it

    -1

»
3 weeks ago, # |
  Vote: I like it -42 Vote: I do not like it

is it rated.

»
3 weeks ago, # |
Rev. 2   Vote: I like it -48 Vote: I do not like it

do you guys know when will they announce the answer of this (Q Is it rated?). If announced can you leave the link below? If it's not rated I would rather virtual this round because in my time zone it's late night. Thanks!

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it
    Answer will be available after the round .
    
    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it -34 Vote: I do not like it

      is there a link that announced it will be available after the round?

»
3 weeks ago, # |
  Vote: I like it -66 Vote: I do not like it

»
3 weeks ago, # |
  Vote: I like it +16 Vote: I do not like it

What does it mean by (1000+1000) in score distribution of div2?

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

    Subtasks: C1 & C2 are worth 1000 each, so C is worth 2000 overall.

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

    div2C has an easy version and a hard version. Each version is worth 1000 points, so 2000 total.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I'm new to cf, but why do they tell you do only read problems you can solve?

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

    Because if you know you can't solve them, why waste the website's precious resources by requesting for the problem page?

    It's codeforces new strategy to reduce server load.

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

    They meant "only solve the problems you can read".

»
3 weeks ago, # |
Rev. 2   Vote: I like it -48 Vote: I do not like it

This score distribution it is looks a little scary!
I hope it will be a good contest!
Good luck everyone!!

Modification : What I meant by shares is that problem B is more difficult than problem c1 and the problem c1 is the same as problem a1 in Dev 1.
Also, there is a big difference between the points of some successive problems in div1 and div2

»
3 weeks ago, # |
  Vote: I like it +13 Vote: I do not like it

After seeing score distribution

Good luck with question B.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I'm not strong enough to compete with all of you >_<

I need do more problems, luck for you!

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

    Is that #657 that got you demotivated?

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      No, I just mean that I'm so stupid. I always be stupid. I need to learn English again, not programming.

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Or you can learn Russian instead. xD

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Yeah, maybe. I'm looking forward to learn Russian. If I have time, I will try it, it will be fun! :D

»
3 weeks ago, # |
  Vote: I like it +90 Vote: I do not like it

In div2, D is worth 12% more than C (that's 2250 vs 2000 points). In div1, those two problems differ by 50% (1000 vs 1500 points). Maybe these two fractions shouldn't be equal but should they differ that much? I don't think so.

#geometricprogressionmatters

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

    well in div2 people usually solve problems in order a b c d etc . and it takes time to solve c1 and c2 and that time is gonna be counted for both of the problems . (penalty would be too much for c1+c2) i think its the reason .

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

      You ignored the fact that penalty is in proportion with the problem points.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it -24 Vote: I do not like it

    And till now, I used to think there was separate leaderboard for div 1 and div 2

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    are you participating today?

»
3 weeks ago, # |
  Vote: I like it +9 Vote: I do not like it

awaiting a good round

»
3 weeks ago, # |
  Vote: I like it -27 Vote: I do not like it

Hope,It will be a great round and we all get high rating, in shaa allah.

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

    Technically according to the rating system of codeforces or any other reliable site there isn't any chance that everyone will gain rating or everyone loose rating.

»
3 weeks ago, # |
  Vote: I like it -8 Vote: I do not like it

so your compiler of FAQ didn't show any output !

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

System test would be a disaster today. Why?

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

Hope this will be rated

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

For no reason I hate subtasks. :/

»
3 weeks ago, # |
  Vote: I like it +6 Vote: I do not like it

Remember : Only read the problems that you can solve. If you can't solve it, don't read it in the first place.

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

    Interestingly, all 4 of these are helpful advice:

    • Remember to only read the problems that you can solve (waste of time)
    • Remember to only read the problems that you can read (waste of time)
    • Remember to only solve the problems that you can solve (waste of time)
    • Remember to only solve the problems that you can read (you won't solve it anyway)
»
3 weeks ago, # |
  Vote: I like it -42 Vote: I do not like it

is it rated ??

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Problem page for me keeps loading.. It's showing nothing

»
3 weeks ago, # |
Rev. 2   Vote: I like it -6 Vote: I do not like it

Problems are great, I wish the queues don't get really long this time.

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

.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

cbcfbg

»
3 weeks ago, # |
Rev. 3   Vote: I like it -9 Vote: I do not like it

I had a correct answer to C1 and I resubmitted by mistake because I had both C1 and C2 open and I was trying to submit to C2 the improved solution. This cost me 200 points :(((

( I submitted C1 after 30 minutes and the second one was after an hour)

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Same with me. Isn't only the first accepted submission supposed to count? Or have the rules changed? :(

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      But pretests passed does not mean it will always pass system testing. The initial solution may not be totally correct so one might want to resubmit a better solution that also passes pretests, but would also pass system testing.

      In addition, haven't the rules always meant that resubmission costs 50 points no matter what?

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I didn't know the rule clearly then. I thought every pretests passed submission is tested against main tests.

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

        Well it would be nice if you could choose (the default is the last one, but you can choose a previous revision).

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    In D won't the answer of last test case be YES?

    If we take A-[4 3 2 5 1 11] and B-[9 12 8 6 10 7] .

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

      No, because 11 and 9 have to be in the same array. The big observation is that if there is a maximum up to now (which 11 is), then until you pass that max, all of the following elements must be in the same array as the max. That's because if they are smaller, and they were in the other array, they would have been picked before the max.

      Think about your example. after 4 3 2 5 1 where chosen, there could be two scnarios:

      a = 11 ...

      b = 9 ...

      or:

      a = 11 9 ...

      b = ....

      The first case CAN'T happen, because 11 was picked, so 9 has to be in the same array with 11.

      My solution simply groups together elements that have to be in the same array, and then I create an array of the number of elements that have to be grouped together. in the last test case, the list of elements is [{4,3,2}, {5,1}, {11,9}, {12,8,6,10,7}] which turns into [3,2,2,5] Now each of these groups can be assigned to any array, so you need to find a subset of elements who's sum is equal to n, which is the subset sum problem. Then I copied this dp solution: https://www.geeksforgeeks.org/subset-sum-problem-dp-25/

      And all you have to do is use this function and return "Yes" if True or else "NO". My solution:

      Spoiler
»
3 weeks ago, # |
  Vote: I like it -33 Vote: I do not like it

Hmmpfffh! Totally disappointed by the explanation of Problem C. It's been 20 minutes and still not able to understand it fully.

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

    What part of it do you not understand? In one operation you take some prefix, flip the bits and reverse it. Then you want to turn string a into string b in 3n operations (or 2n, for the second subtask).

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it -16 Vote: I do not like it

      It wasn't clearly mentioned that we'd to reverse and then flip the bits (doing vice versa would yield different results!). Overall, it was a confusing statement but a nice question.

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

        Can you give an example of a string such that reversing the bits and then flipping them produces a different string than flipping and then reversing them?

        Hint
  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It was well explained. But not so easy to find the logic(at least for me)

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I have submitted code B twice. Then I realize the first code was not wrong. Is there any way to cancel the last submission? My rating has changed a lot because of the last submission.

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

    No. There is no way to cancel any submission.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    i think you can lock one of your submission for judging.
    on submission tab there is lock icon.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It won't change A LOT.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice problemset! Really enjoyed the contest! :)

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    In D won't the answer of last test case be YES?

    If we take A-[4 3 2 5 1 11] and B-[9 12 8 6 10 7] .

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      It would give 4 3 2 5 1 9 11 12 8 6 10 7. Which is different from the last test case. Also, don't leave your comment under other's comment.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      merge(a,b)= [4,3,2,5,1,9,11,12,8,6,10,7] not [...11,9...]

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

My Video solution for Problem B. Hope you Like It.

»
3 weeks ago, # |
  Vote: I like it +18 Vote: I do not like it

Am I the only one who solved Div1A2 using Treap?

Solution: smash me

»
3 weeks ago, # |
Rev. 2   Vote: I like it -38 Vote: I do not like it

😩😩😩😩
please make contests harder, this one wasn't fun

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

    previous one was pretty hard :p

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

    Speaking for div1, lots of contestants only manage to solve A or A+B, and the competition boils down to solving these 2 faster (=typingforces) — and the scoring distribution among the second half of participants doesn't reflect their skills. Harder contests will make this even more problematic.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it -21 Vote: I do not like it

      oh i forgot to look at the standings and realize C wasn't easy

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

        Out of curiosity, is C the type of problem you have been advocating for? It seemed to be a pretty good example of easy solution, nontrivial implementation (assuming my solution is correct).

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

          implementation was trivial, sorry

          • »
            »
            »
            »
            »
            »
            3 weeks ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            :’( I should learn how to code

          • »
            »
            »
            »
            »
            »
            3 weeks ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            Either we're talking about different problems or we have a different notion of what trivial is

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    how did you manage to get WA on A1 and AC on A2?

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      I submitted different codes

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        oh yeah, I saw they were slightly different, so wondering what the key difference was

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it -34 Vote: I do not like it

          i don't know, check yourslef

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

            Hmm.. now I think those two smiley faces in your profile actually symbolise two people on one profile.

            Adam and Eva

          • »
            »
            »
            »
            »
            »
            3 weeks ago, # ^ |
              Vote: I like it -15 Vote: I do not like it
            1. Yourself*
            2. You're pathetic
»
3 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

How to solve C2? Was it based on a similar technique as C1 with optimization, or an entirely new way?

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

    Instead of reversing string i access string form back and front(using deque). Everytime making a character equal i remove that from a and b. And i handle flip of bit using equal and not equal.

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

    Use two pointers

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Please, someone, help me with C2. Thanks in advance

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

    make a either all 0 or all 1 than solve it from the last index

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yaa that I get but what about reversing string in each step??

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

      this is much better what I was doing was adjusting the first index of a according to the b[i] and then reversing. before checking the value of a[i] I was just adjusting its value. I saw the patter to how I should adjust value just before 2 minutes at the end :(

      I missed div2 C2 by 10 sec. I am pissed i am always careless.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      how do you make everything 0 or 1?

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        let say we r at index i from i-i-1 a is either 0 or 1 so if i is same then we have to nothing otherwise change 0-i-1 values

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

    i did it using two pointers and flag that shows the fact that s[l,r] has been reversed

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Any hints for D?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Is the required and sufficient place where a snake can flip around a vertex $$$v$$$ connected to 3 disjoint paths with length >= snake length? I assumed so and looked for all such vertices $$$v$$$ which the snake can reach with its head/tail, but got WA, so I'm wondering if I have a bug or the idea is wrong.

»
3 weeks ago, # |
Rev. 3   Vote: I like it -8 Vote: I do not like it

now after problem C1, I won't forget that "STRING IS IMMUTABLE"

»
3 weeks ago, # |
  Vote: I like it +25 Vote: I do not like it

D1D was inspired by task from MIPT workshow (2019 day 5 B Little Worm). Both are extremely shit.

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

    ... which is taken from Polish ICPC stage (AMMPPZ in Cracow). I was one of the organizers of that contest and I was too lazy today to search for the solution code — solving other problems seemed more fun.

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

      I've wasted a lot of time trying to use these codes — I think that it's hard to use them as the problem was slightly different.

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

        I've used the code for the Little Worm problem to check if we can reach a diameter. It's a bit easier to solve it if our snake is already located on a diameter.

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

      Well, code from that problem didn't help me much, although some parts of the solution share the same idea.

      Also, I liked both problems and I don't think they are too similar: in older problem, the start and finish positions were disjoint as paths, in today's problem they coincide. I hope I will not see the problem without position restrictions in a contest, though :)

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve C1 with 3*n operations?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    change elements of a from the end one by one

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

    solve from the last index if it is correct than just remove it from a if it is not make it correct with the help of 1 index

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I got pretests passed both subtasks with a simple greedy algorithm:

    Spoiler
  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You can always use the zeroth index character for swapping. Iterate from back of first string if its different , then check for conditions.In case — the first character of first string is different from character of second string , you can just perform operation once and update the string : else you need to perform the operation two times first on the very first character of first string which makes it different from character you wanna change for in second string and then perform operation on prefix of first string of desired length.

    Ps: sorry for bad english!

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

need a quick editorial now

»
3 weeks ago, # |
  Vote: I like it +44 Vote: I do not like it

Div2A, Div1B, Div1C, Div1D — Codeforces? More like YesOrNoForces

(I'm actually mocking people that complain about the lack of diversity in problemset by checking similarities that are not relevant).

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

C2 is very interesting. Do we need any data structure to proceed operations?

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    keep a variable for zeroth index character and one variable for number of reverses.Iterate from back and keep updating both of the variables as required.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No, I solved it with array only. Link

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

in C-2 has anyone thought of doubly LinkedList kind of thing with a status variable?

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Do anyone know how to bitset in dynamic length?

Please help. I think I got TLE on pretest 3 in C2 coz of inefficient implementation of this :/

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Same happened with me.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No. I think the main issue is that your solutions is $$$O(n^2)$$$

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yes My code was doing in 2*n operations but time is O(n^2).

      • »
        »
        »
        »
        3 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        So bitset probably won't help in this case

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          So How to resolve it or reduce the complexity?

          • »
            »
            »
            »
            »
            »
            3 weeks ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            Editorial has already been released

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You can just keep two pointers. Its pretty fun to code it that way.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Anybody else wondering why problem B have more points than C1 ?

»
3 weeks ago, # |
  Vote: I like it -11 Vote: I do not like it

Is it rated? :)

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

can someone help with Problem C : 87584443

as per error in TC 4, a is not transformed to b, but when I print a & b it is same ans a is transformed to b.

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

The sample test case explanation was enough for solving Div2-B.. but I didn't care to read it at first because I thought NIM was always based on XOR.. nvm got AC after reading it.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    whats your approach and what you conclude from test case?

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      keep comparing from n-1 to 0th bit. if mismatch found at i, compare b's i'th bit to a's 0'th bit. if both bits are same, means 2 operations required 1. operation on a at 0th bit to flip it. 2. operation on till i'th bit.

      if a's 0th bit and b's i'th bits are different, one operation till a's i'th bit is sufficient

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      "The second player should take the stones from the second pile because the first pile is empty. He will take 1 stone because he can't take any other number of stones."

      The first player can always force ze second player to take out any desired no of stones(which shall benefit him) in every turn , unless he is forced in the same way if there's only 1 stone to take out in the start.

»
3 weeks ago, # |
  Vote: I like it -12 Vote: I do not like it

As expected nice problemset. Next time i will like to solve problem named Monogon and rescheduling.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

In D won't the answer of last test case be YES?

If we take A-[4 3 2 5 1 11] and B-[9 12 8 6 10 7] .

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No, if you merge these 2, you will get

    [4, 3, 2, 5, 1, 9, 11, 12, 8, 6, 10, 7] which clearly not equal.

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

      Why 9 before 11 ?

      won't it be like 3 2 5 1 11 9 12 8 6 10 7 then we add a1 to the beginning ?

      I got it now. Thanks.

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

Last div2 was like div1 and this div2 was like div3. :-)

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    -1+1=0. "Perfectly balanced as all things should be"

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Some things can't be assume to be balanced like "blood pressure" if for half of the time it is above than normal and other half of time it is below normal then you can't call a patient as normal. I think same goes for difficulties in contest.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Video Solution to C1 and C2.
I have discussed how to solve in 2n operations and N^2 time, how to solve in 3n operations and O(N) time.
Finally optimized 2n operations and N^2 time to 2n operations and O(N) time.
Enjoy watching: https://youtu.be/TSr0x3EBWSg

I will most likely make for D also :)

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

Am I only the who who get WA in problem A on test 5(System tests). It's strange. UPD 87526239

»
3 weeks ago, # |
  Vote: I like it +90 Vote: I do not like it

It's good to see a geometry problem from time to time, even if it's nothing new and groundbreaking :D

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

    It's good to see Errichto in comments from time to time, even if it's.. wait what.. no..

    Instead I want to see you on contests page hosting one. :D

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

    It's good to see you in comments from time to time even if it's just for the purpose of gathering some upvotes and increasing your overall contribution through random rheoteric comments.

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It's good to see you solving geometry problems so easily, even when most of the people find them really hard.

»
3 weeks ago, # |
  Vote: I like it -11 Vote: I do not like it

I think the time limit of Div.2 D is too tight. I got the right solution when it was only 30 second before finish, but get TLE disappointedly. My TLE Code

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

From many past contest, counting this one I am having a syndrome that I call "Coded Bug Free Solution after 10 mins of contest is over."
Any helpful tips to get the job done without bugs within time limit??

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

    Every time you find a bug, answer 2 questions:

    • Why did this bug appear
    • How do I change my coding practices so that a bug like that will never appear again.
    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      That's a good idea. I think I should maintain a journal about it.
      Thank you for your advice!

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

    I think instead of trying to code without bugs, learn how to debug.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      What if I learn both to code without bug(Amortized analysis!) and also to debug.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve Div2E?

I used DP on state (i, j, s) which means merge(a[1:i], b[1:j]) (the variable s is used to determine the (i+j)-th element of p belong to a or b)

Let x be the nearest index such that x > i+j and p[x] > p[i+j].

Then the transition is to try to append the x-th element to a or b.

I'm not sure about my solution (although pretests passed). Does anyone have another idea? ^_^

»
3 weeks ago, # |
  Vote: I like it -6 Vote: I do not like it

I think I may finally hit purple thanks to your contest :) So thank you!

I had to think hard the entire time. I especially enjoyed Div2 D. Not sure if it was the intended solution, but I ended up doing a subset sum problem on sizes of segments in the array, after realizing that the array could be split up into segments in a natural way.

»
3 weeks ago, # |
  Vote: I like it +14 Vote: I do not like it

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    TBH, this meme has become boring now to see in every round post

»
3 weeks ago, # |
  Vote: I like it +143 Vote: I do not like it

Nice round imo. I think that for a long time there was no geometry and it's generally nice when problems touch various topics and ad-hocs aren't in majority. Kudos

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

(I already posted it but it was deep in a thread so probably people won't notice it)

An elegant solution that probably works for problem D (finished it 10 seconds after contest was over so not sure :| ): EDIT: Well, it TLEs on test case 30, probably just because of python :|).

Spoiler
»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Interesting observation: when you get WA on pretest 1 on problem C (div1), if you click on your submission, checker tells you what's wrong with your output and provides some additional information (in this case, for example, that in the test case 2, x is not what it should be). You also don't get any penalty for WA1.

This is kinda non-obvious, and gives some slight advantage to people who decide to check the details of the submission. Maybe we shouldn't print stuff like that in a checker?

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

    Printing helpful information in the checker has always been preferred. But I believe it's not available during the contest, and you only see the verdict itself.

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

      No, I actually saw the exact same thing during the contest too, and used it to debug my solution in the last minutes. In was definitely easier than understanding what's wrong myself.

      I agree that printing stuff in the checker is helpful, maybe CF shouldn't show checker output to the participants then.

      Anyways, thanks for the round, I liked the problems! (even though I wrote a silly N^2logN solution with N Fenwick trees on B :)

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

        Why not show the output? This is the sample, so participants could very easily run their program against the case and figure out what is wrong (except if maybe they misunderstood some part of the problem, in which case it is very much in the spirit of samples to give some help as to where the issue is).

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Well, you never really know what checker will say (just "answer is not correct", or "answer is not correct because of X"). To find out you need to get WA1 and check out the submission page, which is not obvious, and may give advantage to people who happen to do so.

          And output in the style of "answer is not correct because of X" can be very helpful when you are constructing the answer, and using sample 1 to see if your construction is correct.

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

      It gives additional information on contest time too. Today i got it on D2C1.

      And i have seen this few more times before. Sometimes it helps to verify if i understand problem in wrong way.

»
3 weeks ago, # |
  Vote: I like it -23 Vote: I do not like it

Very bad pretests in A2. Why didn't you add the max pretest? I thought that if the solution passes pretests in terms of perf, it would be accepted.

»
3 weeks ago, # |
  Vote: I like it +14 Vote: I do not like it

Mai_madarchod_hu is in 2nd position of today's round. I am just imagining the post with the winner's list XD

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I have a rating of 1282(Pupil). Just wanted to ask if Round 658Div2 will be rated for me and will it affect my graph, as it is not updated as of now. I'm new here, please let me know. Thanks

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I wish the contests would have been 2:15. Then I would have got D

:((((

»
3 weeks ago, # |
  Vote: I like it +51 Vote: I do not like it

Hello, Monogon

I think the main test data for div2D is weak.

Check this 87590140 for example.

Input:

1
9
2 1 4 3 7 6 5 10 9 8 13 12 11 18 17 16 15 14

The answer should be YES, but this submission provides NO. Please have a look into it.

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

    I'm sorry that the tests seem to be weak. The final standings are already out, but I can add test cases like this to the system tests so that more wrong submissions can fail in practice mode.

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

      Monogon Please add this test case as well. It seems to give NO as the output for some codes (including the one mentioned above) whereas the answer should be YES.

      Input:
      1
      16
      27 1 28 2 29 3 4 5 6 7 30 8 9 10 11 12 13 31 14 15 16 17 18 19 32 20 21 22 23 24 25 26

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

recently i found a mail that described that my solution for the the problem 1382A matched with another person. But i don't know how it happens. i didn't use any online ide. i use codeblock. so it may be coincidence or something else. i hope , you got my answer

»
3 weeks ago, # |
  Vote: I like it -58 Vote: I do not like it

I want to notify you that omaik786 is also my account . I want to grow two accounts at the same time . If handling two channels is not appropriate , notify me . I won't continue the 2nd account

»
3 weeks ago, # |
  Vote: I like it +56 Vote: I do not like it

Thanks for the round!

My screencast: https://youtu.be/VaCa0CQpYbo

»
3 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

Monogon, Thanks for the contest! I liked it :)

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Omg, I solved A and B and my rating is only 959 now :(

»
3 weeks ago, # |
  Vote: I like it +2 Vote: I do not like it

This was my fifth contest and I liked it. I could have solved the unmerge problem. Ran out of time. Need to get quicker

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

Solution for Div 2 C1 / C2 and Div 1 A1 / A2, where k (number of steps to convert a to b) is almost equal to n.
(limit of 3n and 2n given in the subtasks respectively)

https://codeforces.com/contest/1382/submission/87614809

»
3 weeks ago, # |
  Vote: I like it +10 Vote: I do not like it

The first time I solved a D and got Pretest passed, they failed system test and got TLE.....
Maybe the pretests were infact short :P

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Maybe only me can't find the operations that transform the string a into b in more than 2n steps...I think 1A1(2C1) is a little strange.Because if we fix the bits one-by-one,it's so easy to find a 2n steps in O(n) time.But the contest is nice and thank for +77 lol

  • »
    »
    3 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    There were some random solutions people used, several 3*n solutions worst case, and a couple 2*n solutions that weren't optimized to n^2 in testing. Monogon posted some of them in the editorial if you're curious.

»
3 weeks ago, # |
  Vote: I like it +8 Vote: I do not like it

qwq.png