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

Автор Nanako, 16 месяцев назад, По-английски

"It's been a long time since I came here, and I've really been through a lot." Koxia muses as she chatted idly with Mahiru.

Now that the Winter Festival is approaching. Among the flash of fireworks, in the chimes of the New Year, what is waiting for them to encounter?

Armed with girlish courage, they stepped onwards.

Koxia, Mahiru and Winter Festival

Hello Codeforces!

We (Nanako, m_99, huangxiaohua, SteamTurbine, triple__a, Nezzar) are very pleasured to invite you to take part in Good Bye 2022: 2023 is NEAR, which will take place in Dec/30/2022 17:35 (Moscow time)!

This round consists of 8 tasks waiting for you to solve in 150 minutes, and will be rated for everyone!

On behalf of the author team, please allow me to express our sincere thanks to:

This round is supported by NEAR. The participants in the top 2047 places will receive prizes as follows:

  • Ⓝ 1024 for the first place
  • Ⓝ 512 for the 2-3 places
  • Ⓝ 256 for the 4-7 places
  • ...
  • Ⓝ 1 for the 1024-2047 places

Score distribution will be announced soon.

Besides the regular editorial, materials to be public after the round will also include the Chinese statement and the Chinese editorial.

We hope you enjoy our problems and say Goodbye to your 2022 happily!

UPD1: Score distribution is 500 — 750 — 1250 — 1500 — 2000 — 2500 — 3250 — 4000.

UPD2: Congratulations to the winners!

  1. Benq
  2. maroonrk
  3. Radewoosh
  4. Um_nik
  5. tourist
  6. ksun48
  7. ecnerwala
  8. aaaaawa
  9. DearMargaret
  10. jiangly

Thanks all for joining!

UPD3: The editorial is available.

UPD4: The Chinese statement and the Chinese editorial have been added into the contest attachments.

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

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

EXcited to participate the ending of 2022 contest :") Good luck everyone..hoping for positive deltas :)

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

    Thanks. I think this round will be great and I hope everyone will have a great result. Let's hope that only good memories remain from the year 2022

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

@tester(done) https://codeforces.com/blog/entry/110638 you may start the contribution farm

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

Receiving 1 near nowadays is the same as getting 0

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

As a writer, I think the little cartoon girls in the picture are cute.

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

    As a participant, I think the little cartoon girl in your profile picture is cute.

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

I would participate instead of testing if I knew there was a prize LOL , anyways the quality of the contest is really high and good luck to all of the participants :D

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

The girls are so cute (,,>﹏<,,) I wish I could participate ૮₍ ˃ ⤙ ˂ ₎ა

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

As a returning geezer participant, I ask you young uns to take it easy on us.

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

Goodbye,2022!

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

As a tester, I can say it will be a very good round for you~

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

Beautiful BG, another step to the Animeforces :3

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

Me and my bois calculating the monetary value of 1 NEAR.

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

Happy new year!

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

Hope I can become candidate master!

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

I want to know the difficulty of this game, div1 or div2 or else?

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

As a tester, the problems are very good! I hope you will have fun in this round!

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

I would like to see Santa Claus or a Christmas tree on the announcement

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

OK I surrender no more downvote plz

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

all high rating in 2023!!!

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

I wonder if instead of "Accepted" we will see "Happy New Year"

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

Am I only one who feels that the girl on right is staring at us.

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

    You are too tall. She is probably staring at everyone except you.

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

This year was awesome, wish everyone all the best!!! :)

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

lol

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

Everyone Best of Luck Good Bye 2022 Happy New Year Everyone

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

This contest will be in my Heart. Good bye 2022. Welcome 2023. Wishing the new year will be good one for everyone.

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

I hope I can get a good result this time and get off to a good start for the New Year!

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

Will this be div1 or div2?

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

qwexd is too ORZ

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

Delete this immediately.

Marinush

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

I'm Nanako_fan!

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

One NEAR Ⓝ is about $1.3. Hope I can get NEAR in this contest.

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

This is my last chance to become Master before New Year's Eve. Wish myself the best of luck!

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

As a participant, I wish all participants have a great time and get positive deltas! Good bye 2022!

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

Koxia and Mahiru >>>>

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

the picture is nice!:)

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

EXcited to participate the ending of 2022 contest :") Good luck everyone..hoping for positive deltas :)

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

Chinese Editorial! Good job!

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

Do anyone know which country is 'Ⓝ' belong to?And what's the value?Thanks.

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

As a participant, i wish you a happy new year! :)

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

As a tester, I may ask whether the test is reted or not shinzanmono

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

    Oops, you are a participant instead of a tester. As for rating stuff plz read the announcement carefully.

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

Hoping to enjoy a great contest at the end of 2022 :)

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

I will be ranked #1 in this contest. I am feeling it

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

Authors, please, read this: https://codeforces.com/blog/entry/56119

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

    Oops, thanks for the reminder. Although this round is themed, I'm an opponent of long statements so they will be literally very short and with only necessary pictures.

    As for the announcement, I have checked with the coordinator and the admin before posting, so I guess it's in a reasonable range. If you don't like it, I personally feel sorry for you, but don't blame other authors cuz it's my personal decision to add it. ;_;

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

      No, that's kinda cute, that was just a reminder that someones internet connection might be not that fast :)

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

Is it rated?

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

This year I will focus more on learning and skills than on rating

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

Last chance to see myself as CANDIDATE MASTER Adarsh8409 on NEW YEAR EVE.

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

Excited for this!

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

Hope I’ll become a pupil this round

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

Hope for good results!

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

How many problems I should solve to reach 1900 rating?

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

Good luck everyone..hoping for positive deltas :)

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

Leaving behind my Christman celebrations. Leaving behind my institute's Cultural fest. Leaving behind a dinner party.

Just won't miss 2022's last contest ^o^

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

To all the participants, good luck in the final contest of 2022, and happy new year! may 2023 be a year of great achievements for all of us! :)

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

As a member of ABC squad, I was surprised m_99 is on the writer's list. I surely succeed in the game!

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

Skibididop dop dop oh yes yes yes Shibididip dip Shkibidop ShkibidiW W W.cout<<(("Good luck")?"DOP":"DIP");

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

I don't want to miss out the last contest of 2022 more than I don't want to lose rating

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

Last chance for me to be an expert ( + 154 ) before 2023 [ fingers crossed ].

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

As a participant i am wondering if there are XOR problems

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

is it rated?@2021_yes

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

Good luck to you in the last contest of the year 2022 and happy new year!

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

Damn..

Just realized I wasn't registered and to wait 10 extra minutes for registration pushed me to don't join and wait for virtual, sad.

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

I can't solve the 1st problem (⓿_⓿)
Every solution gives me WA on pretest 2 XDXD

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

    Think about it... which number should you replace with B_j ? The smallest number, of course. Now just implement this with a set<> or priority_queue. I missed this easy solution and went for the guessing ride.

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

      You don't even need to use a set or priority queue actually. Since the constraints are very loose $$$(n, m \le 100)$$$, one can simply sort the array $$$a$$$ after every replacement of $$$a$$$'s smallest number, i.e., a[0] with b[j]

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

Kinda ruined my birthday >︿<

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

Is problem a harder than usual or am just that bad?

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

Why such a bad round in New Year ?

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

    Why such a bad comment in New Year? To be more precise, what's bad with this contest? I disagree that the contest is bad.

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

      Problem C was ugly. Did you look at scoreboard? In a Div.1+2 round, only 3k managed to solve C, while there were 12k participants. Does this problem seem appropriate for position "C"?

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

        YES.

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

          Of course. For higher rated participants the order/difficulty of easier problems doesn't matter, right?. They're gonna solve it anyways, why would they even care ?

          Except that, solution for C was uploaded on youtube during contest. For most of Div.2 people, this will cause something called, Rating Inflation.

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

            The scoreboard and predictor says the rating of C would be about *1600/*1700. This difficulty is really not strange and there are a lot of problem C with this rating.

            About solution leakage, unfortunately I didn't heard about that, but even if that is true, what does that have to do with the competition being bad? Just that behavior is bad, right?

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

              For 1700 rated problem, that amount of ACs is low.

              Behavior is bad. But the contest Will be Bad too. Its more like, who googles first, that wins. No?

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

                Well, there were some contests which suffered such behavior. But were these contests regarded as essentially bad contest?

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

                  No they weren't. But this C is not 1700 rated (harder than that). Which means this contest is not suited for most Div.2 people.

                  But it depends on how you solved it. By guessing? [Hell yeah, free 1000 points. Such a good problem!]

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

                  Now it got *1700 rating tag.

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

I thought that last contest of 2022 will be easy but It says me goodbye from pupil rating

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

Man, problems are kinda difficult. Please include problems of Graphs, DP and Trees in A,B,C and D's'. I am only able to solve these but these are usually adhoc and there are no concepts of DSA used in these problems. It doesnt gives the satisifaction to solve these adhoc problems.

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

    Yeah but you can go for weekly and biweekly on LC

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

      Yeah, I give them but I want to enjoy cf rounds too. Dont get me wrong, they might be perfect for other users but not for me as I am not that good.

    • »
      »
      »
      16 месяцев назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится
      I think what he meant, problems which boil down to those problems(not specifically to DP, Graphs, Trees etc..) may be an array,Binarysearch,2 pointers or which involve a bit of thinking and observation Because in recent contest there is a lot being packed with pure math, Pruning, Brutally Brute Force problems in A,B,C. If you see my problem topics you will find math being solved more inspite of me being not targeting them at all
      
      Bring some level of math is fine but Bringing whole algebra, number theory like Mobius Inversion, Chinese Remainder Theorem, Some Extended Euclidian Theorem Question which was asked in Problem B and Taking some math problem and solving it and giving it to Arabic Writers.
      
      I think they even will create calculus, differential problems and say to print it out as
      cout<<"My Math Answer"<<"\n";
      
  • »
    »
    16 месяцев назад, # ^ |
      Проголосовать: нравится +20 Проголосовать: не нравится

    Read this blog. My thoughts are roughly the same.

    Also funny that you mention D, because D is actually a graph problem after you get some observations.

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

      Actually, I didnt read D for this contest as I was stuck in C. I was not particularly pointing to this contest but all cf rounds in general.

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

Предлагаю сделать раунд нерейтинговым из-за того, что задачи не новогодние

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

As i've expected, Good Bye Expert: Newbie is NEAR! Kinda thrown this one

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

Problem A could've been framed better imo

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

    how did u solved it

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

        did the same thing but getting wrong answer on pretest 2

        PS: i did not sort the second array B

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

          did you first sort A? like without any operations first sort A and then m times swap and sort?

          Or you can use priority queue too

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

            i first sort A then just swapped m times

            if m>=n then basically take all the greater elements of B else we will have to take all the elements of B + remaining largest n-m elements of A

            I dis this...

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

              You'll actually have to swap the smallest element everytime. Let's say A = 1, 3, 7, 8 and B = 3,5,2 Then after 1st swap A should like: 3, 3,7,8 2nd swap 3,5,7,8 3rd swap 2,5,7,8 So it is optimal to pick the lowest element from A everytime and swap it

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

                oh i forgot that after swapping from B that element itself may be smaller than those in A so I must keep on sorting

                Thanks got it

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

            well this isn't optimal way cause let's suppose there are my first array is 3 4 and second array is 1 8 6 now there can be three operation's done so if I only take maximum values of second array and swap them with first array values then after three operations my first array will be 4 8 and second array will be 1 3 6 however if we pass on 1 first then we can make our first array equal to 8 and 6.

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

              The thing is that, you need to swap values from array B one after another, 1st element then 2nd and so on That is why I mentioned it could've been framed better

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

Today's contest was a perfect embodiment of my 2022.
Disappointing and making me doubt my very existence.
I hope 2023 is better :)

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

OK finally I got it,from Master to Expert.

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

I found problem D amazingly beautiful. what a problem and process of solving it was really good

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

How to solve problem E?

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

Who else made at least one WA on A because they sorted the array b (or equivalent) before performing the operations ?

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

Was problem C related to check if the solution to the congruence equations created by each pair exists or not?

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

    just to give a hint. if you have 2 odd numbers and 2 even numbers the answer is NO ! now think about 3 an so on

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

      i tried this method like if we have both (odd,odd) & (even,even) pair then ans is NO otherwise YES.

      this is what i did but its failing testcase-4.

      187368333

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

        that is what i meant by so on ! now what if you have 2 numbers that have reminder of 1 with divided by 3 and 2 numbers that have reminder of 2 when divided by 3 and 2 numbers that have reminder 0 ?

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

      can you share your code please

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

      Is there a theory or mathematical prove for this solution ??

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

A disaster -_-

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

Are these accounts bots? They sent correct solutions all at the same time. There are more of them with the same timing.

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

I... don't even have the will to make the obvious "anime girl on internet == trap" joke. Happy new year, everyone...!

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

Misread A for 20 minutes and skipped the x is positive part(even it is highlighted) in C. Feels bad.

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

I think the record of difficulty of A in div 2 is broken today

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

Problem E was a great problem. (Hint for people who haven’t solved E: the tree edge e_i divides the tree into two disjoint sets)

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

    I've noticed it but I don't know how to calculate number of successful moves along each edges

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

Problem A is such a nightmare.

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

    The solution is simple: iterate over array b and switch element in array b with the smallest element in array a. do this for every element in array b.

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

Before this contest I thought after this contest I might become candidate master and have a very happy New Year. After this giving contest I am depressed and sad on the new year. Hopefully the next year will be better.

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

There were gaps between BC and EF but the problems are very interesting! Thanks for the amazing round in the last of 2022! One regret thing is I can't proof my solution for C during the contest.

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

    Thank you for your endorsement! The proof of C is given in the editorial.

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

How to solve E? It's sufficient to calculate numbers of successful moves of each directions on each edges, but how can we calculate it

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

    For each edge u--v, we cut this edge to get 2 subtrees, and let b(u)=number of butterflies start on the subtree which contains u, similarly b(v)

    Then if m1= number of successful moves from u to v, m2= number of successful moves from v to u, then the contribution of edge u--v is m1(b(u)-1)(b(v)+1)+m2(b(v)-1)(b(u)+1)+(2^(n-1)-m1-m2)b(u)b(v)

    So how to calculate m1 and m2?

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

    Consider the dp(u, i), the probability of after i iterations, the vertex u is covered with a butterfly. Clearly, dp(u, i)= dp(u, i-1) if the other edge doesn’t include u. And the probability of u and v, where e_i = (u, v) should be calculated fairly simply, so we can calculate dp(u, n — 1) for all u in O(N) as all values except two changes between iteration. So using the probability array, we can calculate the probability when there is a movement between the two disjoint trees divided by the ith edge, and thus the contribution of the ith edge to the answer.

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

      But what if probabilities of u and v are not independent

      Update: Now I know probabilities of u and v are independent. Because each edge would be moved only once, and before being moved, moves of u-subtree and v-subtree don't intervene each other.

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

goodbyes are harsh

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

Ending the year with -100 ig :)

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

can someone pls explain logic for problem c?

Thank you.

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

    lets look at prime number p and every pair of 2 elements in the array (a[i] and a[j]). if a[i]%p!=a[j]%p, we can choose every x and independent on x%p gcd(a[i]+x, a[j]+x)%p!=0. if a[i]%p==a[j]%p we can't choose x%p==p-a[i]%p. considering n<=100, we should look at small primes* (and for every prime we have to decide — is there a "good" x%p — if not, there is no solution) *because for big primes there are not so many pairs

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

Oh no!

How to do D?

My idea is to convert it into a forest, and then find the rings. If it is the self ring, answer times n, otherwise the answer is multiplied by 2. But I got the WA on test 2.

my submission

And how to do C...... I am not good at gcd.

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

    Literally me. Did the same thing in D, got 998244353 WAs on pretest 2

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

    I had the same idea, but in the end i realized that there might not be cycles:

    5 1 1 1 1 1 1 2 3 4 5

    C is (good imo) an observation problem.

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

    your idea was correct for D. however there are some twists. think about these 1 : 2 self rings in a component (or any two rings in a component tbh) 2 : a tree in the forest

    both of these can be handled with a simple if ! if the number of edges in a component is not equal to the number of nodes then simply print 0.

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

    Your solution is correct when the answer is not $$$0$$$. For every connected component, the number of vertices and the number of edges must be the same, otherwise there will be same numbers appearing in $$$d$$$.

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

I suggest to make the round unrated because the problems are not New Year's)

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

I had a sol for E for a version where the butterflies could go to another node even if there was already another butterfly. Spent 1 hour coding that and noticed it was wrong after finishing.

Certainly one of the ways to end the year.

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

Good bye, ratings. :(

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

Why is this code showing error for 2nd pretest in 1st q? Please help me

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int t, n, m, i, j, k;
    long long s;
    cin >> t;
    long long a[t][100], b[t][100];
    for (i = 0; i < t; i++)
    {
        s = 0;
        cin >> n >> m;
        for (j = 0; j < n; j++)
        {
            cin >> a[i][j];
        }
        for (k = 0; k < m; k++)
        {
            cin >> b[i][k];
        }
        sort(a[i], a[i] + n);
        sort(b[i], b[i] + m);

        a[i][0] = b[i][m - 1];
        for (j = 1, k = m - 2; j < n && k >= 0;j++,k--)
        {
            if (a[i][j] <= b[i][k])
            {
                a[i][j] = b[i][k];
            }
            else
            {
                break;
            }
        }
        for (j = 0; j < n; j++)
        {
            s += a[i][j];
        }
        cout << s << "\n";
    }
    return 0;
}
»
16 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I did a weird solution in C that passed the pretests, could someone explain why is it correct or incorrect ? 187365787

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

    It seems that everyone solved C like this.

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

    Can you elaborate your thought process for writing this solution? It would make understanding your code easier.

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

      For any number k, if the array has two or more occurrences of all of the values from 0 to k-1 modulo k, then that means for any x we choose we can always have two number in the array giving gcd as 1. Let's say x%k=p then we already have two numbers in the array which give the value modulo k as (k-p) so k will always be the gcd in such situation.

      And also k has to be smaller than 50 if it exists.

      This is one situation, it can be concluded that if such k exists then there is always an x, but I cannot prove that if x exists then there is always such k.

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

        Your solution is always correct. I have an intuitive understanding of why, but I can't give a formal proof.

        It's enough to check all primes $$$p \le 50$$$ since if the array is bad for some composite number, it is also bad for all of its prime factors. And now if it was good for every prime, there exists a set of congruencies you need to solve to get $$$x$$$:

        $$$x \equiv a\ (mod\ 2)$$$

        $$$x \equiv b\ (mod\ 3)$$$

        $$$x \equiv c\ (mod\ 5)$$$

        $$$\cdots$$$

        $$$x \equiv o\ (mod\ 47)$$$

        Becase all of the modulos are prime, they are also all coprime with each other, which means that there exists some $$$x$$$ which satisfies all of the congruences based on the chinese remainder theorem.

        UPD: I realised that the set of congruences up to $$$p \le 50$$$ aren't enough to gurantee that the specific $$$x$$$ works. We would need to add a lot more congruences for larger primes. But we know that there always must exist a valid congruence for each larger prime, which means we can still apply the Chinese remainder theorem to calculate $$$x$$$.

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

Hey, was the problem C really more difficult than standard Div2 C or was I panicking for nothing??

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

Ending with still Pupil :(

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

Fuck Bye 2022.

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

The statement for problem A is quite unclear

It doesn't clarify the fact that you have to use the numbers in array b in the same order they're given.

It just says that you have to perform all m operations... Spent 90% of the contest's time trying to figure it out and lost a lot of points :(

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

    i also thought the same and demotivate since it is A problem and not able to solve Question language was very unclear

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

    The j-th operation is to choose one of the whiteboards and change the integer written on it to bj.

    I think you misread the problem. Happens with me too many times.

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

How to solve Problem C. Could Someone Help

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

    For any $$$i$$$ and $$$j$$$, if $$$a_i \equiv a_j \ \mathrm{(mod\ m)}$$$ for some $$$m > 1$$$, then $$$x$$$ must meet the condition: $$$x + a_i \not\equiv 0 \ \mathrm{(mod\ m)}$$$. Otherwise, the $$$\mathrm{gcd}(a_i + x, a_j + x)$$$ will be a multiplication of $$$m$$$.

    Generally, for any prime $$$p$$$, $$$x \not\equiv a_i \ \mathrm{(mod\ p)}$$$ for any $$$i$$$ and $$$j$$$ such that $$$a_i \equiv a_j \ \mathrm{(mod\ p)}$$$. Also, if there are two or more $$$a_i$$$ such that $$$a_i \equiv r \ \mathrm{(mod\ p)}$$$ for every $$$0 \le r < p$$$, we can't find $$$x$$$ since there will be a pair of $$$a_i$$$ and $$$a_j$$$ which are multiplication of $$$p$$$ for any $$$x$$$. And otherwise, $$$x$$$ always exists. (can be shown by Chinese reminder theorem)

    So the solution is to check whether $$$r$$$ exists such that there are at most one $$$a_i$$$ which meet $$$a_i \equiv r \ \mathrm{(mod\ p)}$$$ for any $$$p$$$. Here, we don't have to check for $$$p > n$$$ since $$$r$$$ will always exists such that no $$$a_i \equiv r \ \mathrm{(mod\ p)}$$$ due to the Pigeonhole principle.

    Iterate for every prime $$$p < 100$$$, and iterate over $$$i$$$ in each $$$p$$$. Count $$$a_i\ \mathrm{mod}\ p$$$ in $$$p$$$-length array and check if 0 or 1 exists. If not, print NO.

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

      Actually, you only need to iterate over every prime $$$p \le 50$$$ since due to the pigeon hole principle for every $$$p > 50$$$ there must exist at least one $$$r$$$ such that $$$a_i \equiv r\ (mod\ p)$$$ appears at most once.

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

I think C>E>D.

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

    C was basically noticing that we only have to check primes under 100 as for primes above 100, by Pigeonhole principle, there would be always a free residue which x can take. I guess the hard part was thinking this as a CRT/prime problem

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

      Omg shit shit... How it clicked man?

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

      Can u tell it in more detail? I haven't gotten the idea, why can we always find x > 100 to fit that ?

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

        Because n is bounded to 100, the number of residue classes that are forbidden is strictly less than the total number of residence classes

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

      As n <= 100, at max we can make 50 pairs right?, so isn't 51 enough. Just couldn't wrap my head around this.

      Edit: It got Accepted, now someone should confirm whether my assumption is True or Tests are weak

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

        Oh yeah for each prime, if there is a residue class with less than 2 elements, the prime is good

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

      Actually, I did it in a different way, but it took me infinity :(

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

goodbye to 2022 and goodbye to lots of my ratings :)

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

This round was tough.

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

At the last minute!

Image

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

    can you explain your solution please??

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

      I was waiting for it to pass system tests. Now, as it passed, I can explain it

      You can say NO only if you proved that all positive numbers till ∞ will cause a problem for at least two numbers.

      Now consider the divisor 3

      suppose you have two numbers in the array that if you added 1 to them, they will be divisible by 3,

      suppose the same thing for adding 2 and adding 3.

      Now, if you added 1, the first two numbers will not work. If you added 2, the second two numbers will not work. If you added 3, the third two numbers will not work. And lastly if you added 4, it is the same thing as you adding 1 (by taking mod 3).

      And the same will happen for 5 and 6 and so all other positiver numbers, so there is no solution.

      This explanation is for 3 only, you need to check this also for all other numbers $$$ ≤ n/2 $$$

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

contest is hard

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

meme

Did only I struggle..

Edit: (Mistake) Sorry I am soo exhausted rn.. It was in Problem A

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

Goodbye 2022! Goodbye my rating!

I think that problems are interesting but a little too difficult QAQ

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

time to downvote

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

2022 hasn't been a good year for me and this contest is just the confirmation , thanks

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

I fucking hate this round

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

This Is Probably The Toughest Contest I've Ever Appeared On CF :(

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

Goodbye 2022. Goodbye mom of authors :))

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

    What does that mean, are they same like problem G in today's contest?

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

      Not exactly the same, G is reduced to this problem, but the reduction is very simple.

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

        can you explain how to reduce it? I watched your screencast, where you coded the function solve by hand instead of copying from the old submission. Is it because the reduction is not exactly the same as the original one?

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

          I'm just stupid. The original code was written before I wrote fft library for myself, and I was afraid that it might have been too slow for this problem (the new code is also very slow smh), so I decided to write it in the new style.

          As in the editorial, we'll solve for ) and ( independently. Focus on (. Let's say that the minimum balance is $$$-m$$$, then we have to remove $$$m$$$ brackets before the first occurrence of the minimum balance, and we have to make sure that after removals all the balances are non-negative. It's the same as saying that we have to remove at least $$$k$$$ brackets before the first occurrence of balance $$$-k$$$. Let's build a Young diagram corresponding to these limitations. Each move will mean the next bracket, if we move up, we remove it, if we move right, we don't. So we are interested in the number of paths from the lower-left corner to the upper-right corner, but some cells are forbidden, as we know that we have to move up at least $$$k$$$ times before the first occurrence of balance $$$-k$$$. It is easy to see that these limitations describe a Young diagram.

          Example:

          $$$ ( \color{green}{)} \color{red}{)} \color{red}{)} ( ( \color{green}{)} ( \color{green}{)} \color{green}{)} \color{red}{)} ( \color{green}{)} \color{red}{)} $$$

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

    Just curious, how do you keep track of similar problems like these? Or do you just remember bits of problem statement and use that to Google them.

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

      This one is just a very natural-sounding problem (count the number of paths in Young tableau) and I was very proud when I was able to come up with the solution in training, so I remembered the circumstances when I solved it (it was a training with my ICPC team, somewhere in 2019, the contest was in CF Gym), so I was able to search the trainings we participated in that period of time. The actual process from my screencast.

      Good problems stay in your memory, what can I say.

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

Brain Limit Exceeded.

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

Thanks for the round! Regardless of my performance, I think the problems are nice, especially D and E. This is my short comment for the problems.

A. Normal problem. I used priority queue in D2A for the first time(although naive works) XD

B. Constructive problem. It requires some observation(and maybe some intuition?), normal problem.

C. It requires some intuition again :P, but good problem. I got WA on last pretest because I mistook the limit of n as 50. XD

D. Nice problem. Graph modeling and following observations are good. I heard the implementation can be hard according to approach, but easy implementation exists.

E. Nice problem. The idea is hard, but clear. How to create such problem?

F. I read it, but currently has no idea.

G, H. Not read.

My performance in Good Bye 20xx contest has many ups and downs, this time my performance went up, maybe I can reach GM for the first time?

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

    can u explain C pls?

    This was my approach https://codeforces.com/contest/1770/submission/187361827

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

      We have to see all prime numbers less than or equal to n/2. For some prime number p, get the remainder of each element divided by p, and if every number between 0 and p-1 appears twice or more, the answer is NO. If no such prime number exists, the answer is YES. Consider this case,

      #

      whatever the value of x is, there should be always 2 multiple of 3, so the answer is NO. Your code print YES in this case.

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

        I thought of the exact same solution and it got accepted. But how can we prove it's correctness?

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

how to do problem c??

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

    don't solve just watch anime and sleep

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

    It is Russian language. Посмотрите на то, есть ли одинаковые числа. Посмотрите на то, есть ли такое число, у которого каждый остаток встречается по хотя бы два раза И так и так ответ Нет.

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

Not my best contest performance-wise, but several of the problems were excellent--F may well be my favorite problem of the year. Thanks to the authors!

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

D was very very similar to https://codeforces.com/gym/103149/problem/D. Both are very good problems in my opinion! But yeah, unfortunately the idea was not very fresh...

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

Why so many downvotes and hateful comments? IMO, the problems are very good (at least A-D), thanks to the authors, despite my terrible performance.

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

can someone please tell in which test case it got stuck? 187372015 and why this one got accepted 187372786

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

    The $$$m$$$ operations should be performed in order. However this is not mentioned in the statement.

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

Discussion for D:

First, the 1st player cannot give the 2nd player any chance to choose from 2 different numbers, because when you change any number of a permutation you will break it.

Therefore for any i, {ai,bi,ci} must contain <=2 different elements. If ai==bi, no matter what ci is, pi (the ith number of the final permutation) will be equal to ai, else pi=ci where ci==ai || ci=bi.

Then we construct a graph with vertex number 1-n and add edge ai--bi for each i. We must assign a vertex for each edge and each vertex assigned must be distinct. We consider for each connected component. If there is a component where vertexs are less than edges, there are not enough vertexs to be assigned in this component. Because in the whole graph there are n vertexs and n edges, there must be equal numbers of vertexs and edges in each component.

Then in each component with k vertexs and k edges, because a graph with k vertexs and k-1 edges is a tree, this component must contain exactly 1 cycle. If length of cycle >1, we have 2 different ways to assign vertexs for edges on this cycle (accroding to 2 directions of the cycle), and each other edges in this components has only 1 vertex can be assigned (in each step we assign a leaf vertex to the only edge connected with it, then delete the vertex). if the length of cycle ==1, which is a selfloop, we can choose any number for ci.

Therefore, ans=product(c has different number of vertexs and edges? 0 : c has a selfloop ? n :2), where c iterate among every component of the graph.

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

Did anyone solve D using recursion?

I figured that the number of recursive calls will be atmost equal to the number of connected components in the graph approach

However it is giving me MLE

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

    When you use a vector as a parameter of a function, it will be copied into the next function call. When the recursion is too deep it will cause MLE.

    Also coping a vector consumes much time. Use dosomething(vector &v,…) instead if possible.

    (By the way in java you always transfer an object by reference, and you must copy an object explicitly)

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

    You wrote void help(vector<int> x,int i,int ans), and this will use $$$(recursion \ depth)\times(the \ size \ of \ x)$$$ memories. Tryvoid help(vector<int> &x,int i,int ans) instead.

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

This contest was harder than usual. No idea how I didn't lose rating.

A had me freaking out for 30 minutes lol.

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

Can problem c be solved by using binary search?

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

Thanks for green, finally in the end of the year and begin the new year with another plan to cyan.

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

Update: Is it forbidden to say "Finally I've become CM" on codeforces?

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

In this round there are about 100 accounts that are using the same code. The logic of these codes are exactly the same. Only some words have been replaced. And these accounts get almost the same score in every problem. Please check it.

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

2022 ended with dark memory,i felt the contest.

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

This contest boosted me to purple, orz.

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

Congrats to my friend prvocislo, who promoted to Grandmaster with a rating change of +1.

revision: the rating change has been adjusted to +2.

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

Thank you for this nice round and fast editorial. I had fun participating today. I have a question though, I didn't understand the prizes. What is N?

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

Thanks for keeping such a wonderful contest. It ended my big negative delta streak from past 7 contests.

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

It was a good contest to lose all the rating I gained in 2022

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

So finally I can celebrate this new year with my maximum rating.Thanks for this nice round. :)

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

Really frustrating year, gave 60+ contests and solved 700+ problems with a rating greater than mine, still not able to cross 1300, reached a pupil in may who was still not able to be consistent on that also, after every contest feels like defeated and came and doubt on my existence. Will work on my weakness and will give it every single contest with full energy next year as well! Thank you 2022 and welcome to 2023!

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

ArtAlex has OK on D, but he has O(n^2) solution(Kuhn's algorithm)

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

Does anyone know what is test 165 of pretest 2 at problem D?

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

Why I cant open the tutorial page, it shows me: " You are not allowed". How can I fix this ?

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

Всем привет! Когда будут отправленi Нiары?

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

Can somebody help me...why this submission of mine got runtime error. It passed all the pretests but got runtime error on test case 4. Thank you in advance for your time and effort.

https://codeforces.com/contest/1770/submission/187326346

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

    Your code doesn't handle the n=1 case. Since in n=1, you are accessing arr[1] and all[1], its showing RTE. Handle it separately and it will pass.

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

A little question: where is the Chinese editorial?

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

Why BenQ uses Rust for solving H in Goodbye 2022 contest? Is there any benefits over C++?

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

In this contest Prize of Ⓝ 1 is for contestants ranking between 1024-2047 places What is Ⓝ 1 actually

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

From starting off as a newbie this year to becoming an expert in the last contest of 2022...it was totally worth all the efforts...! Loved yesterday's contest....Thank you for the contest!

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

I passed problem D at 02:24 of the contest after 3 wrong submissions. Though I got only 664 points in D, my rank rose for a lot. My rating also rose more than $$$2^7$$$. I am very glad on the last day of 2022.

2023 is near. Hope us can get higher rating!

Most importantly, happy new year!

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

What anime is this?

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

    Good problem. It's about a Vtuber project instead of an anime.

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

Hey MikeMirzayanov Nanako , I got these 1 messages 2 hours ago.

Attention! Your solution 187313065 for the problem 1770A significantly coincides with solutions Rakesh_898/187313065, rk0145906/187325506, Krtrk_007/187361450. Such a coincidence is a clear rules violation. Note that unintentional leakage is also a violation. For example, do not use ideone.com with the default settings (public access to your code). If you have conclusive evidence that a coincidence has occurred due to the use of a common source published before the competition, write a comment to post about the round with all the details. More information can be found at http://codeforces.com/blog/entry/8790. Such violation of the rules may be the reason for blocking your account or other penalties. In case of repeated violations, your account may be blocked.

I haven't used any online IDE or compiler, nor did I copy the solution from anywhere. I even don't know any of these persons, not in real life nor on Codeforces. The questions were pretty simple & so there's a very high chance that the logic might be same for two different individuals.As you also can see that i submited the code at 18:24 and other two submitted the code at 18:44 and 19:51. my logic is same as that of editorial, that doesn't mean I got access to editorial beforehand. It's just a coincidence that the logic matched. I don't know what else can I give as a proof. Please look into the issue, hoping for a resolution.

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

when we will be able to obtain the near coins ?

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

Any updates on receiving the near coin prizes?

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

Why the answer of problem F is zero when n is an even number?

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

How do you create PDF?

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

when will the ratings for problems get updated, it has been more than a week since the completion of contest, but problem ratings are not yet updated.

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

why a {1,2,2}, b {1,2,2}, ans is 5 not 6 ?