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

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

It's been a long day without you, Codeforces!

We are glad to invite you to take part in Codeforces Round 969 (Div. 2) and Codeforces Round 969 (Div. 1), which will start on Aug/30/2024 17:35 (Moscow time). You will be given 6 problems and 2 hours and 30 minutes to solve them in both divisions.

The problems are authored by LMydd0225, tzl_Dedicatus545, _FJqwq, _TernaryTree_ and me _istil and mostly prepared by LMydd0225. One of the problems is also prepared by CleinCc.

We would like to thank:

Hope you will enjoy the problems!

Score Distribution:

  • Div. 2: $$$500 - 750 - 1000 - 1500 - 2250 - 2750$$$;
  • Div. 1: $$$750 - 1250 - 1500 - 2000 - 2500 - 3000$$$.

badges$$$^\dagger$$$ of the authors:

$$$^\dagger$$$: Began in 2022 at NOI Shanghai, Badge Exchanging has been an activity popular among Chinese CPers. The host school for NOI 2022 decided to print badges containing the avatar of contestants for the contestants, and one can exchange his or her badge with another. The collection of one's badges (of other CPer's avatars) shows the group of CPers that he has met and even made friends offline. It has achieved great success. And since then, it has been a tradition for years.


UPD: Congratulations to the winners!

Div. 1:

  1. tourist (Updated, and congrats!)
  2. jiangly
  3. ecnerwala
  4. Radewoosh
  5. Kevin114514

Div. 2:

  1. mkrukov07
  2. temp6
  3. wjq1234567
  4. bingpao
  5. AuSquare (It seems that the rank 5 was banned? So let's move on to rank 6!)

The Editorial is out. You can also download Simplified Chinese Editorial in the contest material of the Div. 1 part of the contest.

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

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

thank you for no subtasks

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

    Subtasks are good though because if you normally solve n problems with subtasks you you might have a chance to solve n+1 (or n+0.5) problems. And normally I have noticed the first subtasks of problem n is either of the same level or slightly easier than problem n-1.

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

As the girlfriend of tzl_Dedicatus545, may you good luck & give me contribution!

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

hope this contest is good!wish me luck!

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

Score distribution looks really odd. I think it would go something like this, wouldn't it?:

  • Div2: Div2A — Div2B — Div2C — Div2D/Div1A — Div2E/Div1C — Div2F/Div1D
  • Div1: Div2D/Div1A — Div1B — Div2E/Div1C — Div2F/Div1D — Div1E — Div1F

Btw, the badge custom is really cool, I wish I could have done the same when I was younger T.T

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

As one of the authors, good luck & have fun!

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

As a tester, the problems were good and I recommend everyone to participate!

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

As a tester, the problems were good and I recommend everyone to participate!(

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

I tested this round, and I hope you all enjoy it!

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

As a tester, hope you have fun!

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

As a tester, when my solution has a different output from the example during testing, I suspect the author first.

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

    Fun Fact: The solution of Div.1 A was initially wrong when I tested the problem.

    Fun Fact II: 1A was in the position of 2C before we find out the mistake.

    Fun Fact III: There was another 1A before the current 1A was presented, and it was also wrong.

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

      I'm guessing this is referring to the sample with the same number of '1' and '0' leaves + '?' root + odd number of '?' non-root vertices? I feel like there would be a lot of WAs without that sample.

      I tried proving that that was the only "edge case" but just gave up and submitted after several hundred submissions AC'd :/

      I'm not even sure what you're supposed to do to solve that problem. Just be smart enough to prove it correctly and quickly, or assume that the samples are strong (which to be fair does seem to be a trend in As)?

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

Not as a tester, when can I obtain your badge _istil

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

As a tester, I have two badges of one author but none of the other five XD

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

Time to get a color change in this contest XD

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

As a tester who hasn't participated a contest formally on Codeforces for nearly an entire year, I hope all of you a positive delta.

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

As a tester, it's a very good contest and hope u have fun!

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

The badges are so cute!! Reminds me of trading Pokemon cards :)

I wish I would meet many CPers in real life and exchange ideas too. Also, good luck to all!

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

hope to reach 1550

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

As a tester ,wish you have fun and gain positive rating delta.

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

I hope my downfall will come to an end this week

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

As a tester, I wish all contestant having fun in this contest.

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

What cartoon is this.....,,,??.???,???

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

is there any correlation between being weeb and high rating?

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

So as the photo says Problem D will be a graph problem?

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

Anyone know the sauce for the top right badge? Also interested in the others too. I think top middle is from "Bocchi the rock"

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

FreeDurov****

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

Were rating constraints for div 2 changed? Pretty sure it used to be 0-2099 yet I can't register(and don't see anyone with 1900+ rating registered).

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

badges looks nice I hope I can get one someday

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

All the best everyone. This time +100.

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

Based Kana Badge <3

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

Missing Ai (┬┬﹏┬┬)

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

Hope to solve ABCD for once in contest time. All the time I drop at C or B because of panic WA or TLE or whatever feeling is running in my head...

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

tourist gonna reach 4K finally!

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

As a tester, I missed the opportunity to compete officially in a great round! I hope you enjoy it!

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

The idea of badges is incredibly cool. I believe it should be extended worldwide.

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

The badges looks so cool!!!

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

Just curious to know if someone submit the same code in div1 A and div2 C is there a chance to get both his contests skipped.. like is the checker gonna check all codes from both the round together and search plagiarism or check the rounds individually?

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

I'm hopeful this contest will be both fascinating and enjoyable for everyone. Let's aim to boost our ratings and have a great time. Good luck, everyone!

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

As a tester, the contest is the GREATEST round I have ever seen!

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

As a tester,I just realized that it's the one I've tested and my rating-boosting dream was rained(T_T)///GL&HF everyone,not bad probs

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

As a tester,I tested the round.

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

As the boyfriend of the girlfriend of the tester yuanruiqi, may you good luck & have fun!

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

I love u _istil

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

Good luck & have fun!

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

My first Div1,let's go!!

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

Hope it wont be bad for my first div1.

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

These Badges look awesome. How to get them?

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

How can one find cool avatars like these for CP accounts? Also, I hope the badge exchange tradition can make its way to international events... Great additional incentive to try reaching them.

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

The badges idea is so cool!

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

Wish to have a good problemset..

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

As not a tester, I hope to test it live

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

tourist just signed up... 3947 -> ?

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

Rooting for Tourist to 4000!

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

Will tourist have a 4000 rating this time?The fate is coming.

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

my classes end at 6pm, it'll take me 90-120 minutes to get home, I'm not missing this one, I'll make it!

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

let get pupil rank with this one! cuyu fighting!

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

hope tourist will reach 4k

...

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

I watch anime, too. Why can I reach the level as the authors TAT

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

as a participant, hoping to reach $$$1900$$$.

»
21 месяц назад, скрыть # |
Rev. 9  
Проголосовать: нравится +62 Проголосовать: не нравится

tourist winning this round is going to feel like Messi finally winning the world cup.

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

Mathforces incoming.

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

wish to cross 1800

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

The grandmaster who commented its going to be an extremely chinese round was right. This is basically math olympiad not programming contest.

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

first time ever I decide to unrate contest after registration by making no submission.

problem A is wow, just wow, what the f**k is that

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

How to join, where is late registration?

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

ARE U F KIDDING ME ????? WHAT DIV 2 A ????????

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

There is an option to unregister, can i unregister now?
I thought once the contest starts no action can be done regarding registration.

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

A: Guessforces B: I'm dumb for not reading the statement right C: Pure arithmetic, not really algorithm really

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

jiangly has solved all before tourist :( so no 4000 for tourist

sorry tourist for commenting too soon

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

I start hating cp because of this shit

and we all know that after testing not all cheaters are removed

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

he did it

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

tourist solved F!!!

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

Chinese rounds always shave off a few days of my lifespan, but I still keep participating in them

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

What a Contest tourist is ahead of jiangly by 5 points only

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

Nice round. No long queues, no Cloudfares.

Most importantly, we witnessed HISTORY — 4000 rating for tourist!!

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

tourist has finally become the first person on cf to cross 4000 rating barrier

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

tourist 4000 rating !!!

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

Is C really that easy? 5k solves...

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

orz tourist .. the legend has finally made it.. cheers

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

Please tell me I'm not alone by being bamboozled in this div2A...

Cost 30 minutes for coding gcd and brute force and a lot of time on thinking about optimize just to realized you are being bamboozled (but after this I can solve C in the right path! So maybe not bad at all)

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

tourist orz...

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

Poor Jiangly! Congratulations to the tourist with a rating of over 4000!

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

I was able to figure out the condition in Div1C/Div2F but couldn't think of how to implement it, Consider the set of elements in the subarray l to r, if we were to take the gcd of the consecutive differences of the elements in the set then the gcd must have a odd prime in its prime factorization, In this Case, the subarray is not brilliant.

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

    Got the idea maybe, We need to take difference of consecutive elements in the array and then use two pointers right?

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

      Basically, but you need to have a way to efficiently recalculate gcd when removing an element (segtree works, sparse table should work as well, there may be other ways), and make sure you don't screw something up if all of the numbers in a subarray are equal.

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

    What?

    I reached that for $$$n=2$$$ an array can be brilliant if the difference between the two elements is a power of $$$2$$$

    Intuition :

    Let the number of elements between $$$a_1,a_2$$$ be $$$Z$$$, I choose the middle element, then half of the remaining elements on the left will be separated from the other half on the right of the chosen average.

    So I went from difference $$$Z$$$ to difference $$$(Z-1)/2$$$, and I should always be able do divide $$$Z-1$$$ by $$$2$$$, so $$$Z$$$ must be a power of $$$2$$$ minus one, so the initial difference must be a power of $$$2$$$

    $$$2^n$$$ does not have any odd prime O_O

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

tourist orz...

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

Solve div2D at 02:27:30... This contest is really tough for me.

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

tourist orz

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

Yet another "Found bug 30 seconds after the end" contest for me... The problems are great though.

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

can someone explain why this solution does not work for div2 problem D

https://mirror.codeforces.com/contest/2007/submission/278834900

isn't that all we need to do is determine if the root has a number? if it has, we only try to give numbers opposite to root's, else we can determine weather iris can give her turn to the opponent

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

how to solve d1C?

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

    I couldn't submit solution because of a bug, but it looks like the condition is $$$GCD(|a[l + 1] - a[l]|, |a[l + 2] - a[l]|, ..., |a[r] - a[l]|)$$$ must be a power of $$$2$$$ (or $$$0$$$). It is the same as $$$GCD(| a[l + 1] - a[l] |, | a[l + 2] - a[l + 1] |, ..., | a[r] - a[r - 1] |)$$$ and then you need a sparse table to find these values fast for each left position $$$l$$$.

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

great problems! sad that limitations in E are so high :( didn't have time to figure out how to improve $$$O(n \log^2 n)$$$ to $$$O(n \log n)$$$.

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

Smart-Select-20240831-020606-Chrome

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

Was anyone able to pass HLD in Div1B?

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

How is tourist that invincible?

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

how to solve C?

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

    the funny thing is that it has 5k AC

    it's not this easy to get all of this but thx to cheaters actually

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

    First let's imagine you have only A, not A and B. Then you can fix the difference between values if it's not smaller than A. e.g. A = 5, values = 5, 10, you can make diff = 0. But if it's 5, 11, the lowest diff is 1.

    Second, now we have A and B. If you have A = 5, B = 10, then B is useless, because A * 2 = B... or, actually, because GCD(A, B) = A! So now we have a clue. If GCD is 1 (e.g. A = 5, B = 9), we can ALWAYS make a difference of 0!!

    The idea: calc gcd(A, B), then for every number get it's Value % GCD(A, B). Maximum of this array — minimum of this array is your answer... UNLESS...

    Let's say GCD is 7, and you have values 1, 6. But 1 + 7 = 8, and 8-6=2 is better than 6-1=5. So now you need to actually iterate the array of values % gcd(a,b) you got before to see if you can optimize the solution by adding to the values[i] your gcd. Though to understand this there were steps in between that I have missed in the explanation.

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

If no fst.Tourist will get the first 4000 rating. Congratulations.

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

The 4-th sample of D1A reduced it's difficulty a lot. Otherwise it's problem rating could increase by 100.

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

I've never experienced so much skill issue solving a div2A q.q

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

    Experience with GCD problems was required for the A, I think... and for the C as well... GCDforces.

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

      Funny thing is that I've immediately noticed bezout's identity on problem C but couldn't figure out that any 3 consecutive numbers, with the first one being odd, are coprimes (fro problem div2A) :/

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

        How do you solve C with bezout's identity. I just know it means ax+by=gcd(a,b). For C I realized that eventually the difference between possible linear combinations of a, b with different positive x and y integers converged on gcd(a,b) if you sort all the unique values that were generated. So you get a difference array that will eventually [....,gcd(a,b),gcd(a,b),gcd(a,b),...,gcd(a,b)], just be gcd(a,b) at the end.

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

          You actually used the theorem. It state's that gcd(a,b) is the minimum positive value we can get from a*x+b*y with x and y as integers. From what I understood of your comment it seems you just did not fully understand the theorem, and treated this as an unrelated observation. Sorry in advance for any misunderstanding.

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

          I will explain to you my solution for the div2C problem. The first step is to understand that, by using bezout's identity, we can add or subtract (by adding it to every element except one) a multiple of G := gcd(A, B) to the elements of array C. That means that we can shift backwards all elements of C so that C_i := C_i mod G. Sorting all elements (C_i mod G) and keeping them distict, it's a matter of asking if there is a prefix that is useful to shift forward by G (for example, if I had the elements 1 mod 5 and 4 mod 5, it would be useful to see the 1 mod 5 as a 6 mod 5, making the solution 6-4=2 instead of 4-1=3), which means finding the smallest [ C_i + G - C_(i + 1 mod N) ] mod G in O(N).

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

            bro just please tell how to get intuition of shift back thing or minus thing it's like the operation is plus how did you know that minus won't make any differ this is very hard to observe for me

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

              Honestly, when I first read the problem I assumed that you could subtract, only after the contest ended I noticed you could only use addition lol. You could get the intuition for using subtraction by noticing that it would really be useful if you could subtract A and B, unlocking bezout’s identity, it’s just a matter of justifying why is it possible.

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

      I got rekt in A just to have a better start at C, so maybe it's fair trade in div 2 after all

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

lost a ton of rating but atleast it went to good cause
Finally 4000 gonna be breached

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

Some very cool problems, thanks a lot to the organizers! :)

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

Passed the example of D 5min after contest ends...

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

f**k me and my understanding for B , dammnn

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

The little boy from Belarus on behalf of every little boy wearing his shirt. Tourist on a million backs, Tourist for a million flashbulbs.

Gennady Korotkevich aka Tourist becomes first ever competitive programmer to cross 4000 rating mark on Codeforces.

Greatest programmer to ever exist!

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

A and C were uh, peculiar problems, but very well written and thought out.

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

hardest Div2A I've ever seen. 40min of thinking with 0 progress .. euler totient? integer sieve? how it is possible

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

Hints for Div2 C?

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

Can someone explain why I see this?

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

I had the logic for D but my bad implementation trolled me :(

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

GOAT tourist !!Can someone tell me the rule that the problem score in div1 decreases with time?

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

I've spent a significant amount of time trying to solve Problem B , then I realized the problem I am trying to solve is not B.

How bad a problem statement can be? => This bad.

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

As a competition on Codeforces, I believe there are too many data structure problmes in this game. Both D1D and D1E require some data structures to maintain, and most of D1C's practices also require the use of data structures. These questions are not difficult in terms of thinking, but they require a lot of time to write code. I don't think this is in line with the style of most Codeforces competitions. At the same time, D1E allows the time complexity $$$O(n\log^2 n)$$$ approach to pass when there is an $$$O(n\log n)$$$ approach, as long as you write it well, but in reality, this approach is not difficult to think about, only requiring some template code to be combined and slightly modified. I think this game is more focused on testing code implementation ability rather than short-term thinking ability. If it is played under the IOI format, it may be a qualified game, but it is not suitable for Codeforces. Or, in other words, it pioneered a new style of codeforces div1 competition ;)

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

Releasing Chinese editorial before the English one??

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

Maybe only me got FST on Div1, Ofast + unroll-loops maybe harmed me >< 278842172 278846221
During the round I got PT passed and PT=ST but I got WA-FST, very strange...

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

Thank you, tourist, it was the best and most epic live broadcast of my life!

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

Too much math to be honest.

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

mfw I'm 5 minutes away from AK div 2 ToT

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

Aug 30th: World tourist's day.

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

nice

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

I think people are more excited on tourist reaching 4000, than tourist himself

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

MANNNNNN I got cooked so badly :( All because of Div. 2 A

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

The worst Div2 in the whole summer

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

My dream is lgm ✖️ My dream is Tourist ✔️

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

The Tourist has passed Codeforces; he needs Codeforces 2☠️

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

The contests was epic. I haven't seen such good problems in a very long time.

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

Maybe it's better to update the post so that we can see his new color.

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

Why do Chinese authors like multiple test cases so much? It almost reminds me of the days when I worked on HDU problems all day

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

Guess difficulty

Div2A — 800

Div2B — 1000

Div2C — 1400

Div2D/Div1A — 1800

Div2E/Div1B — 2200