marzipan's blog

By marzipan, 4 months ago, translation, In English

Hello, Codeforces!

I am happy to invite you to our Good Bye 2023, which will be held at Dec/30/2023 17:50 (Moscow time). The round will be rated for all the participants.

The tasks were created and prepared by 74TrAkToR, zwezdinv, OR_LOVe, marzipan, platelet.

We would like to thank everyone who helped us a lot with round preparation:

During the round you will need to solve 8 problems. You will have 2 hours to solve them.

Score distribution: 250—750—1250—1500—2000—2750—3750—(2750+1750)

We wish you good luck and high rating!!!

UPD https://codeforces.com/blog/entry/124060

UPD1:Tutorial was published

Announcement of Good Bye 2023
  • Vote: I like it
  • -4617
  • Vote: I do not like it

»
4 months ago, # |
  Vote: I like it +118 Vote: I do not like it

i hope for a very good contest before 2024

»
4 months ago, # |
  Vote: I like it +98 Vote: I do not like it

As a tester, I wish you have fun (and do not rage at the end of the year) Good luck!

»
4 months ago, # |
  Vote: I like it +230 Vote: I do not like it

As a tester, I will not write any more rounds this year

»
4 months ago, # |
  Vote: I like it +2 Vote: I do not like it

Thank you

»
4 months ago, # |
  Vote: I like it +77 Vote: I do not like it

Lets hope aliens attack in 2024 and teach us how to P = NP before destroying us

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I think they would give us a quantum computer instead

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

    Why depend on aliens do it yourself instead of posting sh*t online

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

    Let's hope aliens attack in 2024 and give us a better round than this one before destroying us

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

Good Bye 2K23 and Welcome 2K24! Hope that the last round of this year will be more enjoyable :)

»
4 months ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it

Hoping to finally cross 2200!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I hope it will be my last nice and impressive round in this year

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

Wish everyone a happy new year 2024!!!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

goodbye 2023

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hopefully 2024 will be good lol

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The contest name is so excellent that I simply couldn't resist participating in it:)

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

So the final contest for the year 2023, hope for everyone to get positive delta

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good Bye 2023..!! Wishing everyone a Happy New Year. and hope for a very good contest before 2024. Happy Coding.

»
4 months ago, # |
  Vote: I like it -16 Vote: I do not like it

After bad performance on the last div 4, I hope to reach pupil in this contest

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I hope that this round will be lucky for all of us!!!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

bye 2023 , hi 2024 !

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I hope that this round will be lucky for all of us!!!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Any idea about the difficulty of the contest ?? Like similar to div2 div3

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

Why so many downvotes?

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

    Did u practiced on some other platform before as i can See u were already good starting with your first contest

»
4 months ago, # |
  Vote: I like it +2 Vote: I do not like it

as a tester, i can wish you only good luck

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Div 2??

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

    Looking at the previous year contest it looks like it will be a Div 2

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Hoping to reach cyan before year end :)

»
4 months ago, # |
  Vote: I like it +25 Vote: I do not like it

What will be the score distribution?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hi 2024 good bye almost prime 2023.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What's the overall difficulty of the tasks?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

good bye! <3

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

is the difficulty of the tasks similar to Div 2?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    No it'll be div.1 + div.2

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

    The first 6 problems are like Div.2 A-F. The last two are harder problems, like Div. 1 E and F.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Goodbye 2023 and Hello 2024... I hope that this year will be an end to all your problems and difficulties and that this year will be a year full of joy and happiness for everyone. Happy New Year everyone 2024.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

looking forward to it

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

hope to have fun at the last contest of the year

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

i hope, i'll reach cyan in this contest

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Happy New Year everyone! Wishing happiness and joy for everyone in 2024, hope everyone gets positive delta in the last contest of the year!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hoping to end the year with + delta

»
4 months ago, # |
  Vote: I like it +37 Vote: I do not like it

Wow so E is hard. Gotta lock in

also why only 2 hours

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

    also why only 2 hours

    Relatively easy problems? That would be my guess

»
4 months ago, # |
  Vote: I like it +6 Vote: I do not like it

I hope it will be a good end to this year. Good luck to everyone

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I am expecting to reach the pupil! Let's see what happens in the last contest of 2023!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I promised last week that I won't play CF anymore before my final-exam. But...Hey guys,that's the last time in this year...

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope to have a better time in 2024!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I need +70 or I lose the bet to pk_27. :(

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

wow so many problems but i only wish to reach pupil after this round

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I hope to achieve a score of 1600 in the new year.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

marzipan did the score distribution for problem E and G changed ?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

hope i can solve 2 of this:(

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hoping for a doable D

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

bye 2023!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I don't have courage to participate good bye and hello contest as I lost 200 rating last time.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Based on the score distribution, can we expect that H1 is approximately as hard as F?

»
4 months ago, # |
  Vote: I like it +24 Vote: I do not like it

Looks like a math-force.

»
4 months ago, # |
  Vote: I like it +19 Vote: I do not like it

74TrAkToR for excellent coordination and useful advices. Bro, it is advice not advices. Advice is an irregular plural.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

As a participant, I hope everyone will be happy in 2024!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

May this contest help me in reach pupil

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

Goodbye 2023!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Always great to end the year with a contest!

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

Why is the SCORE distribution changing every couple hours?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

At the end of the year, I want to have my best contest !!

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Hope it ends my slump. So the year enda on a Good note.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

as a participant, i say: Happy New Year!

»
4 months ago, # |
  Vote: I like it +14 Vote: I do not like it

it's not sponsored by near?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Sad to say....but this gonna be my last contest for this year:(

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

i wish everyone good luck ;)

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good Bye 2023!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good Bye 2023

»
4 months ago, # |
  Vote: I like it +6 Vote: I do not like it

Goodbye 2023,Or as they say in China: "再见2023".

»
4 months ago, # |
  Vote: I like it +8 Vote: I do not like it

The last round will be good for those who are trying hard for the whole year. Good luck to everyone.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Chilling contest, chilling day.

»
4 months ago, # |
  Vote: I like it +12 Vote: I do not like it

Hope no queueforces like yesterday

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Usually that's only a problem in Div.3/4 and not in Div.1+2, but we'll see

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Happy new year in advance, everyone!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I don't wanna go back to being a newbie, please :!!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good luck to everyone. This will be my first ranked contest

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good luck!

»
4 months ago, # |
  Vote: I like it -15 Vote: I do not like it

is this like a div2?

»
4 months ago, # |
  Vote: I like it +23 Vote: I do not like it

It's a pity that it was postponed for 5 minutes(

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

guys,what happened? why is it put off?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good luck for us!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good Luck!!

»
4 months ago, # |
  Vote: I like it +55 Vote: I do not like it

1 refresh cost me 10 min... lol :)

»
4 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Hope the queue is not long today.

»
4 months ago, # |
  Vote: I like it +36 Vote: I do not like it

is the contest postponed for severval minutes?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Is the contest postponed for 10 minutes?

»
4 months ago, # |
  Vote: I like it +85 Vote: I do not like it

Good Bye 2023+10minutes

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Hope I get some ratings :D

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Delayed ??

»
4 months ago, # |
Rev. 3   Vote: I like it +47 Vote: I do not like it

Out of curiosity, are the delays due to registration issues again?

I'm pretty sure I registered ~45 mins ago, but when I reopened CF around 20 mins I wasn't registered (and had to register again).

EDIT: Managed to reproduce the issue, opening the list of registered friends causes me to be unregistered even without clicking the unregister button on that page.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I also opened my list of registered friends. Didn't happen to me though.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I registered and entered the contest. After clicking "submit" on problem A, I found that there are no submission logs, and the submit button disappeared. After that I tried to click "submit code", but it said that I was not registered for this contest. I have to wait until 15:00 UTC for additional registration before submitting my code.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

why 22:45

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

good luck!

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

Good bye 2023 :>

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

April fool 2023? XD

»
4 months ago, # |
  Vote: I like it +157 Vote: I do not like it

Looks like 2023 isn't quite ready to leave us yet

»
4 months ago, # |
  Vote: I like it +7 Vote: I do not like it

The Last Ride of the Year...

»
4 months ago, # |
  Vote: I like it +2 Vote: I do not like it

If I turn cyan today, it would be an actual "happy" new year :)

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

How to get rid of "Checking if the site connection is secure"?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good bye 2023(((

»
4 months ago, # |
  Vote: I like it -9 Vote: I do not like it

Aren't we 2018 now? T_T

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I thought this problem was solved already back in 2018. But it still exists in 2023 but with different language :P

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

    bro just lost from Nott'm Forest he lost track of time

»
4 months ago, # |
  Vote: I like it +35 Vote: I do not like it

And yet another delay xD

»
4 months ago, # |
  Vote: I like it +44 Vote: I do not like it

Delayforces

»
4 months ago, # |
  Vote: I like it -6 Vote: I do not like it

Idk, but today I don't feel like giving contest X(

»
4 months ago, # |
  Vote: I like it +52 Vote: I do not like it

one refresh cost me 5 more minutes

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

why still late for 5 minutes

»
4 months ago, # |
  Vote: I like it +12 Vote: I do not like it

Why 5 more minutes postponed

»
4 months ago, # |
  Vote: I like it +2 Vote: I do not like it

Are you kidding me? -_-

»
4 months ago, # |
  Vote: I like it +17 Vote: I do not like it

Delayforces!

»
4 months ago, # |
  Vote: I like it +24 Vote: I do not like it

With the repeated delays, I am starting to doubt the quality of the problems.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I guess its more likely to be a problem with platform issues such as judge stability (i.e, high risk of a large queue).

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

    Now, it looks like the concerns were spot on

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Good luck!

»
4 months ago, # |
  Vote: I like it +47 Vote: I do not like it

What happened? Do the contest authors not want to say goodbye to 2023? Rescheduled again(

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why delayed?

»
4 months ago, # |
  Vote: I like it +10 Vote: I do not like it

Ig the contest will start untill 2024

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

GoodBye 2023 typically

»
4 months ago, # |
  Vote: I like it +59 Vote: I do not like it

20:05 No

20:15 No

20:20 No

20:23 XD

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I don't wanna use codeforces mirror but cloudflare keeps reloading the page when i verify :(

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

What the he*ll bores?

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

I wanna cry(

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

Hope this is the last postponement...

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Why it always delay

»
4 months ago, # |
  Vote: I like it +1 Vote: I do not like it

This is the most annoying thing that website can do

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

why did the time got rescheduled ?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it -13 Vote: I do not like it

    This is my first comment on codeForces, lmao

»
4 months ago, # |
  Vote: I like it +10 Vote: I do not like it

stress

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

why is the time changing? I can't get on to the contest

»
4 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Delay no more please

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

Codeforces ..its not april month XD

»
4 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Can we get a Belated Good Bye 2023 :D

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Delayforces pls! :)

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Goodbye "Good Bye 2023"

»
4 months ago, # |
  Vote: I like it +36 Vote: I do not like it

I was 10 minutes late and then to my surprise, I logged in 5 minutes earlier!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Bruh why codeforces trolling?

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

Delayforces

»
4 months ago, # |
  Vote: I like it +11 Vote: I do not like it

delay until 2024?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

last contest of this year

»
4 months ago, # |
  Vote: I like it +24 Vote: I do not like it

5 minutes delay takes away the time about 0.3% of this year

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

    8% of remaining 2023 into a dust. Only 22h remaining in 2023 at last.

»
4 months ago, # |
  Vote: I like it +11 Vote: I do not like it

Today’s contest is sponsored by SBI

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

C'mon. Don't be angry. Let's focus on the contest.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Delay it one more time and It will be welcome 2024

»
4 months ago, # |
  Vote: I like it +24 Vote: I do not like it

Everytime i refresh got 5 min penalty

»
4 months ago, # |
  Vote: I like it +24 Vote: I do not like it

April Fools Day Contest 2023

»
4 months ago, # |
  Vote: I like it +10 Vote: I do not like it

As a tester, I think this round will be amazing

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Seems like it will keep on being rescheduled till its actual year end for Mike. X0

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

22:50?(UTC+8)

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Why am I sweating in winters

»
4 months ago, # |
  Vote: I like it +11 Vote: I do not like it

I could have played 1 more Valorant-ranked game.

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

thank you sir for this amazing platform I wish this platform should be forever .

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

welcome the coming of 2024!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

The delay was so long that contest become Hello 2024

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

I was registered, but I can't submit because it says I'm not registered. Can someone please fix this ASAP?

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

I was registered and now it is showing not registered and there is also not option for registration

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

Good Bye 2023 with LOL contest ....registered for it but showing i am not...:)

»
4 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Ending 2023 with another mathforces round this is amazing

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

the rooms are broken i cant find mine

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

Thanks for the contest, Finally Cyan :)

»
4 months ago, # |
  Vote: I like it +143 Vote: I do not like it

Worst D I have ever seen even though I solved it.

»
4 months ago, # |
  Vote: I like it +22 Vote: I do not like it

Now I'm really curious about the intended solution of H. Because it's 100000000000% not my solution.

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

    there is an already available solution for this question on google.

»
4 months ago, # |
  Vote: I like it +31 Vote: I do not like it

Biggest Mathforces of the year

»
4 months ago, # |
  Vote: I like it +34 Vote: I do not like it

Good Bye my rating... See you in the next year

»
4 months ago, # |
  Vote: I like it +8 Vote: I do not like it

Now I'll become a purple coder again :)

»
4 months ago, # |
  Vote: I like it +98 Vote: I do not like it

How much did 74Tr paid to Mike ?

»
4 months ago, # |
  Vote: I like it +47 Vote: I do not like it

I guess problem H is not an original question

»
4 months ago, # |
  Vote: I like it +61 Vote: I do not like it

I have a message for the author of D.

»
4 months ago, # |
  Vote: I like it +10 Vote: I do not like it

Mathforces

»
4 months ago, # |
Rev. 6   Vote: I like it +5 Vote: I do not like it

Sorry, guys. I was trying to report a streamer, but I didn't realize that my question would be visible to everyone.

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

All is well that ends well :( But It wasn't

»
4 months ago, # |
  Vote: I like it +306 Vote: I do not like it

And the prize for the worst contest of 2023 goes to...

»
4 months ago, # |
  Vote: I like it +14 Vote: I do not like it

Is H copied from somewhere or is it just easy? I dont remember the last time the last problem was solved so fast in a div1.

»
4 months ago, # |
  Vote: I like it +8 Vote: I do not like it

how to solve E?

  • »
    »
    4 months ago, # ^ |
    Rev. 2   Vote: I like it +21 Vote: I do not like it

    Build segtree on euler tour.

    Now we do a dfs, and when are at node $$$u$$$ and have traversed all nodes in its subtree, for each node $$$v$$$ in its subtree, store only those nodes $$$v$$$ such that no ancestor of $$$v$$$ in subtree of $$$u$$$ has the same color as $$$v$$$. How to "store" such a node $$$v$$$? Simply add $$$+1$$$ on $$$[tin_v, tout_v]$$$ in the segtree (when deleting it, we will just add $$$-1$$$ on the same range) . It is equivalent to only considering highest occuring color on all paths to prevent overcounting.

    For node $$$u$$$, we can now find the optimal path when we fix $$$u$$$ as the lca. This is simply the product of the two maximum values of $$$(1 + max(tin_c, tout_c))$$$ accross all children $$$c$$$ of $$$u$$$. The answer is the maximum of this value across all $$$u$$$.

»
4 months ago, # |
  Vote: I like it +8 Vote: I do not like it

How D?

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

    For larger n its this pattern. X on the left, X**2 on the right.

    10000011 100000220000121 10000101 100002020010201 10000110 100002200012100 10001001 100020021002001 10001010 100020201020100 10001100 100022001210000 10010001 100200120020001 10010100 100202102010000 10011000 100220121000000 10100001 102010020200001 10100010 102010202000100 10100100 102012020010000 10110000 102212100000000 11000001 121000022000001 11000010 121000220000100 11000100 121002200010000 11001000 121022001000000 11010000 121220100000000

  • »
    »
    4 months ago, # ^ |
    Rev. 2   Vote: I like it +41 Vote: I do not like it

    Or you can simply construct these:

    1690000
    9610000
    1060900
    9060100
    1006009
    9006001
    1960000
    
    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      might be simple question, but how do I know for sure these are perfect squares? Did you brute force for small n and guess the pattern? or is there some kind of proof for this?

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

        Observing the answers for <=7 will be enough

      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        A0..n..0B^2 = (A*10^n+B)^2 = (A*10^n)^2 + 2(A*10^n)(B) + B^2

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

        Notice that $$$(10^k+3)^2=10^{2k}+6\times 10^k+9=10000\ldots60000\ldots9$$$ and $$$(3*10^k+1)^2=9\times 10^{2k}+6\times 10^k+1=90000\ldots60000\ldots1$$$.

        So, the answer for something line $$$n=11$$$ can be:

        • $$$90000600001 = ((3\times10^5+1)\times 10^0)^2$$$
        • $$$90006000100 = ((3\times10^4+1)\times 10^1)^2$$$
        • $$$90060010000 = ((3\times10^3+1)\times 10^2)^2$$$
        • $$$90601000000 = ((3\times10^2+1)\times 10^3)^2$$$
        • $$$96100000000 = ((3\times10^1+1)\times 10^4)^2$$$
        • $$$10000600009 = ((10^5+3)\times 10^0)^2$$$
        • $$$10006000900 = ((10^4+3)\times 10^1)^2$$$
        • $$$10060090000 = ((10^3+3)\times 10^2)^2$$$
        • $$$10609000000 = ((10^2+3)\times 10^3)^2$$$
        • $$$16900000000 = ((10^1+3)\times 10^4)^2$$$
        • $$$19600000000 = (14\times 10^4)^2$$$ (a special case)
      • »
        »
        »
        »
        4 months ago, # ^ |
          Vote: I like it +1 Vote: I do not like it

        you can try observation. I think its hard in this case, but possible.

        I bruteforced for n<=9 and solved it by finding the pattern that way.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Jokes of assumption

»
4 months ago, # |
Rev. 2   Vote: I like it +76 Vote: I do not like it

H: https://math.stackexchange.com/a/1859668 ?

$$$\prod_{j=1}^r\,\frac{q^{j-1}\,\left(q^{m-j+1}-1\right)\,\left(q^{n-j+1}-1\right)}{\left(q^j-1\right)}\,$$$
  • »
    »
    4 months ago, # ^ |
      Vote: I like it +57 Vote: I do not like it
    • »
      »
      »
      4 months ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      The most down-to-earth formula I found (and implemented) is here, at the bottom of page 19 (or 26 in PDF numeration): Thesis of Geoffrey Critzer

      $$$ f (n, p, k) = \frac{\left((p^n - 1) (p^n - p) \cdots (p^n - p^{k - 1})\right)^2}{(p^k - 1) (p^k - p) \cdots (p^k - p^{k - 1})} $$$

      Along with how to infer it in the few pages above (which can be skipped in contest time).

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

        btw, i wondered for a while how to deal with "divided by zero" is issue. It seems that the constraint does not imply $$$p^k \not\equiv 1 \mod 998244353$$$?

        • »
          »
          »
          »
          »
          4 months ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          Interesting, I just assumed the values are "good".

          Perhaps system tests will say otherwise :) .

          • »
            »
            »
            »
            »
            »
            4 months ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            i asked the authors for clarification during contest, and was responded "no comments" as expected xD

            • »
              »
              »
              »
              »
              »
              »
              4 months ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              That may mean they (will?) add such tests before system testing phase. Especially if the author solution avoids such divisions. Would explain the wait, too.

        • »
          »
          »
          »
          »
          4 months ago, # ^ |
          Rev. 2   Vote: I like it +47 Vote: I do not like it

          It might not be an issue at all (and I think most contestants, myself included, kinda lucked out here).

          By repeatedly factoring, you can see that $$$f(n, p, k)$$$ is

          $$$ \displaystyle \frac{(p^n - 1)^2 (p^{n - 1} - 1)^2 \cdots (p^{n - k + 1})^2}{(p - 1) (p^2 - 1) \cdots (p^k - 1)} $$$

          multiplied by some nonzero constant (everything happens in the field of numbers modulo $$$998\,244\,353$$$).

          I claim that one of two things is true: either there are no zeros or there are strictly more zeros in the numerator than in the denominator. Let $$$r$$$ be the smallest positive number such that $$$p^r = 1$$$. It's a well-known fact in number theory that if $$$p^m = 1$$$, then $$$r \mid m$$$.

          In the denominator, the first time a zero appears is the term $$$p^r - 1$$$. By that time, we have had all exponents $$$n - r + 1, \ldots, n$$$ in the numerator. That is $$$r$$$ consecutive values, one of them is divisible by $$$r$$$. Since the terms in the numerator are squared, it means that we have two zeros in the numerator among the first $$$r$$$ terms. Repeat the same argument for all blocks $$$[tr + 1, (t + 1)r]$$$ in the denominator, and the claim follows.

          Since there are more zeros in the numerator, if you go back to the integers you can see that the entire thing is a multiple of $$$998\,244\,353$$$.

          If you had a "typical" solution (e.g. incrementing $$$k$$$ and adding terms to the formula) and your code doesn't throw an error when calculating the inverse, then you could just pretend that no division by zero ever occurs and your solution would still be correct. Even if you had a different solution using some similar formula (maybe with additional pointless terms cancelling out), you can probably show that it is correct using a similar argument.

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

            Thanks for your clarification! That's a cool proof.

»
4 months ago, # |
  Vote: I like it +232 Vote: I do not like it

Was this contest made from the rejected problems of Good Bye 2013? :)

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I tried submitting C last minute but it lagged. Really annoying.

»
4 months ago, # |
  Vote: I like it +109 Vote: I do not like it

»
4 months ago, # |
  Vote: I like it +96 Vote: I do not like it

WTF H1 & H2???????

»
4 months ago, # |
  Vote: I like it +15 Vote: I do not like it

ruined my last cp contest of year

I hate game problem so much like it's unreal

»
4 months ago, # |
Rev. 2   Vote: I like it +46 Vote: I do not like it

Does anyone use the same method as me in problem D?

Violent enumeration of numbers $$$1 \sim 575000$$$ squared, calculate the answer for $$$n \le 12$$$, and find that the number of answers for $$$n=11,12$$$ has exceeded $$$99$$$. Simply add an even number of zeros after these numbers.

Submission link

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

    I did that as well, D feels more like an April first question than a div2. D

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    I used the fact that 31, 13 and 14 work for $$$n = 3$$$ and extended it with zeros, explained by the following example for $$$n = 7$$$:

    $$$1300, 1030, 1003, 3100, 3010, 3001, 1400$$$ (all squared)

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

    violent enumeration lol

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

      truly the best translation of 'brute force'

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Anyone else lose time trying to find the n = 7 case for D? I was stuck for 30 minutes until I brute-forced it...

»
4 months ago, # |
Rev. 2   Vote: I like it +9 Vote: I do not like it

Problem H: Link (page 20)

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

how tf do u do B

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

    i returned lcm ,but if lcm<=b then multiply lcm by lowest prime factor of a/b and return. it worked for me hope it passes system tests

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

      prove?

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

        The smallest divisor of n is one. Next is a prime number p. Next may be other prime number q, or p^2. In first case a = n/q, b = n/p. gcd(a,b)=n/(pq) and lcm(a,b)=ab/gcd(a,b)=n. In second case a = n/p^2, b = n/p. lcm(a,b)=n/p=b. p = b / a, n = b * p.

        As you can see, b/a is a prime number in second case. It is unnecessary to check it.

»
4 months ago, # |
  Vote: I like it +87 Vote: I do not like it

will it be unrated because of H.

»
4 months ago, # |
  Vote: I like it +91 Vote: I do not like it

OMG H1&H2, doesn't any testers noticed the task is already exist?

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Can you guys tell me which topics or questions I need to work on to build intuition for problems like problem B

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

The moon is beatiful, isn't it? But this contest is ...

»
4 months ago, # |
  Vote: I like it +10 Vote: I do not like it

Did H leak?

»
4 months ago, # |
  Vote: I like it +24 Vote: I do not like it

What is this D????

»
4 months ago, # |
Rev. 3   Vote: I like it +149 Vote: I do not like it

[deleted]

»
4 months ago, # |
  Vote: I like it -16 Vote: I do not like it

How to solve B? Here is my code, it is getting wrong answer in 2nd test case......

void solve() { ll a, b; cin >> a >> b; if(a == 1) cout << b*b << '\n'; else if(a%2 == 0 || b%2 == 0) cout << b*2 << '\n'; else { bool f = 0; for(ll i = 3; i <= a; i+=2) { if(b%i == 0 && (b*i)%a == 0) { f = 1; cout << b*i << '\n'; break; } } if(!f) cout << a*b << '\n'; } }

»
4 months ago, # |
  Vote: I like it +41 Vote: I do not like it

First 4 problems were really really bad. Bad problems for Good Bye 2023!

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

very good guessforces, I have a good 2023!

»
4 months ago, # |
  Vote: I like it +7 Vote: I do not like it

Squeezed H2 using $$$O(n\log^2n)$$$ FFT using AtCoder Library's implementation.

Hope that it doesn't FST.

»
4 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Pretest and problem statement for A were very bad, seems like a FORCED problem.

»
4 months ago, # |
  Vote: I like it +110 Vote: I do not like it

Why in hell someone need to verify if I'm a human or not when only 15s is remaining in the contest?

How frustating it is to not being able to submit because of verfication?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    THIS. THIS HAPPENED TO ME. I could not submit my code for C b/c of this. I am malding rn

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

      Couldn't submit D. An already frustating contest wasn't frustating enough at the end of the year.

»
4 months ago, # |
  Vote: I like it +11 Vote: I do not like it

Did anyone solve D without brute-forcing and guessing the pattern, if so, how did you come up with the logic?

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yeah i guessed a pattern but ain't sure abt that

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    i did not guess the pattern i coded for n = 5, 7, 9 digits and got the pattern.

  • »
    »
    4 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Couldn't solve it as I spent most of the time generating cases for higher n and verifying locally. I think the solution is to append "00" and insert "0" in between the strings {"169", "196","961"} for higher n. For example {"16900","10609","19600","10906","96100","90601"}