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

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

Hello, Codeforces!

I am very excited to invite you to my second-ever contest, Codeforces Round 1065 (Div. 3), which will start on Nov/20/2025 17:35 (Moscow time)! In this contest, you will be given 2 hours and 30 minutes to solve 7 problems, two of which have been split into subtasks. The subtasks for a given problem are not necessarily placed adjacently in the problemset.

The round will be hosted by the rules of educational rounds (extended ICPC). Thus, all solutions will be judged on preliminary tests during the round, and after the round, there will be a 12-hour phase of open hacks. After the open hack phase, all accepted solutions will be rejudged on successful hacks. Also, note that there is no score distribution — rank will be determined by number of problems solved, followed by penalty; wrong submissions will incur the usual penalty of 10 minutes, following the rules of educational rounds.

As a reminder, only trusted participants of the third division will be included in the official standings table. This is a compulsory measure for combating unsporting behavior. To qualify as a trusted participant of the third division, you must:

  • take part in (and solve at least one problem in) at least five rated rounds
  • and not have had a rating of 1900 or higher at any moment in time.

Regardless of whether you are a trusted participant of the third division or not, if your rating is less than 1600, then the round will be rated for you (unless you register unrated).

Also, note the rule restricting the use of AI. If you are caught breaking this rule, you will be condemned to life spent in prison the basement of some unspecified Codeforces user. Said person's basement is a rather unenjoyable place to live in, so I would advise adhering to the rules.

I would like to thank the following people for helping make this round possible!

Good luck, and have fun!

UPDATE: Due to issues with Cloudflare, the round has been rescheduled for Nov/20/2025 17:35 (Moscow time).

UPDATE: Editorial

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

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

As a tester, yuri is peak

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

a @reirugan round ? i wish it will be as good as your previous div3 round !!

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

anime kiss jumpscare

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

what's today's codeforces topic?

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

Could you please remove the gif?

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

codeforces when my mom enters the room

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

as a tester, this gif actually spoils the entire contest

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

I got jumpscared so hard by that gif.

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

Game's fucking gone

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

'condemned to life spent in the basement of some unspecified Codeforces user' when are we specifying this lad

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

As a tester, unspecified Codeforces user is yuri

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

As a tester, reirugan tested my yuri knowledge.

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

Hope I can solve a question or two

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

What is the anime name so I can watch it with my family later?

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

Tester here — had fun with this round! Cool problems (gif got changed)

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

source? for cf practice ofc

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

wtf is that gif

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

we got gay codeforces before GTA VI?

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

sauce ?

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

add some problems with yuri :-)

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

I am now curious about the problem statement for this contest.

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

can't wait for the contest's problem statements

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

is this a hint that there will be at most 18 problems?

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

No way this was an codeforces notification!!

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

opening codeforces is never disappointing

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

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

This announcement just relieved all the fatigue from the latest contest in a blink! thanks for the GIF of Adachi!

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

I will give it a try; I hope it's as good as my previous Div-3 round!

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

waiting to become pupil!

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

As a participant always love to taking part in Div. 3 contests

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

Why do some problems feel trivial only in hindsight? Is the idea inherently simple, or do we just overthink when the timer is running?

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

Wth! is going on in the comment section. Someone please exolain in alice and bob terms

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

All my favorite NYU students have helped in this contest. Wow!

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

The picture is beautiful, feeling happy when opening codeforces.

Btw, who is the charactor in the picture?

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

As a reirugan fan good luck guys

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

I hope this contest will be much easier-

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

安達としまむら round!

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

sui chat bro

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

I am a Newbie.

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

skibidi

Related ? $$$67$$$

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

Adachi Sakura!!!

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

How lucky I am to see a Yuri picture on CodeForces! It really makes me curious.

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

"macaquedev for pretending to test;" lol

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

The subtasks for a given problem are not necessarily placed adjacently in the problemset.

Uhh what do you mean by that??

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

My cf is ruined

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

Excited for battle!!!

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

Can I try? I'm just a new person

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

Llegar, partir y merendar

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

Hope to solve at least 5 problems,thus increase my rating.:)

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

Thank God...No more interactive problems

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

Today is my birthday:)

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

how can i participate as a tester in a competition?

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

To qualify as a trusted participant of the third division, you must:

take part in (and solve at least one problem in) at least five rated rounds

what does it mean ?

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

    You need to have completed 5 CodeForces rated rounds, simply registering doesn't suffice, you also need to have solved at least one problem in those 5 rounds (actual participate). For example this div 3 is also a rated round.

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

hope everybody get a positive Delta

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

All the best to everyone hope i get closer to specialist

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

If I didn't participate in 5 rated rounds, Why I ain't trusted?

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

Looking for a "Demon Slayer" based contest if we are entering the zone of anime in cf!

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

Thank you cloudflare for forcing this round to be delayed

I blame the vibecoder that broke cloudflare's code

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

was the contest originally now and they postponed it or am I tripping

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

looks like due to codeforces being down for some time the round will be delayed for two days?

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

What just even happened XD

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

what is wrong with cloudflare :》

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

I was looking forward to the yuri. At least it didn't happen during the actual round.

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

Why is the contest delayed?

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

hello?

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

Wtf???Rescheduled , was looking forward for the contest.

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

Now Contest is Delayed!

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

Actually it went well just before the contest begin...lol

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

I hate Cloudflare:(

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

just wanted to solve some Div3 for me

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

It's amazing that Cloudflare is fixed a minute before the original contest start time.

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

It has delayed.

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

I'm seeing that Shayan's and Arpa's streams are scheduled to release within the next three hours. Please get rid of them!

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

    Arpa's video has already been delayed

    I believe Shayan hasn't prerecorded his video; my understanding is that he usually screenrecords live during the contest

    Thanks for pointing it out, though!

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

Cloudflare be trippin :cry:

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

Let's go, the contest got rescheduled, and now I'll get my well deserved normal sleep time.

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

As Cloudfare is back in service, are there any chances that the contest's date returns to being today?

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

Why the contest has delayed but the stream has not delayed?

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

Was praying that it gets rescheduled. Thanks:) . As a contestant , I hope to get plus delta!

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

Why 48 hours delay :(

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

Just after rescheduling the contest ,the cloudflare came back ! noice:)

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

The issue with Cloudflare is fixed, you should reschedule it back to today

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

So, Cloudflare has always been the villain?

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

I came home in turbo mode for the contest and codeforces said, 'Relax bro, we are delayed!' Perfect, I rushed for maximizing my frustration!

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

cloudflare disappointed us all

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

thanks i have my exams tomorrow. 2.5 hrs saved. I'll utilise this in sleeping

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

there are two long days left to wait

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

W organizers!!! I thought I would miss todays round (╥﹏╥)

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

What was the earlier gif :) reirugan

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

I hate Cloudflare...

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

Dead internet theory has a new definition now

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

Damn it. We just lost an opportunity to witness a fairest CF contest ever!

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

Non-hackers getting a crawling ban is sweet justice given all the pain hackers have experienced over the past year.

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

Try CF Submitter : https://marketplace.visualstudio.com/items?itemName=DevXSayan.cf-submitter — Fetch all the problems of a live contest inside vscode, view questions without reloading hustle, run test cases, and submit in one click, all without leaving vscode

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

Aim to solve A to E

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

This is going to be my first rated contest, im very excited, hoping get some rating :D

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

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

Adashima is the best!

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

CONTEST ABOUT TO START

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

C2 > DEFG

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

Div. 3>>1

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

For problem E,my code 349964120 construct a permutation with atmost 1 bad index.I wonder whether 6 was there just to confuse.

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

My B solution kept failing on some hidden case, I am confident my logic is correct. Also for D, I was trying to use DSU based approach but kept timing out. Any ideas on approach for problem D?

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

    For problem D

    Spoiler

    I hope I wrote it clearly)

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

In Problem E, why multiples of 2, 5 and 10 doesn't work but multiples of 2, 3 and 6 work ?? Is it because we can have at most 6 bad indices and not 10 indices ?

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

    we can make 0 bads as well , the fact that matters is that for any N there are total primes always <=N/2 with N :)

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

    a proof for why 2,3 specifically work:

    consider a solution of the form

    **_**_**_...

    where the * themselves form a sequence s.t. the adjacent * are not coprime. clearly, such a solution has no bad indices. so, it suffices to find a sequence of the * numbers with length >= 2n/3.

    consider multiples 2 and 3. it now suffices to show that these cover 2/3rds of 1 .. n. consider partitioning 1 .. n into disjoint groups of 3 starting from 3. let j be the first number in the block (e.g. 3,6,9,etc.). if j%2==0, then j%2==0 and (j+2)%2==0. so we have covered 2/3 numbers in the range j,j+1,j+2. if j%2!=0, then j%3==0 and (j+1)%2==0. so we have also covered 2/3 numbers in this range. so, from any n we can form a valid sequence * using multiples of 2 and 3, but making sure we carefully place 6 to connect the 2 and 3 multiples. so we use 2 4 8 .. 6 3 9 15 .. for the *'s and fill in the rest.

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

felt like this was hard compared to other div3

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

I was able to do G in $$$O(N * log(N) ^ 2)$$$
Code link: https://codeforces.me/contest/2171/submission/349941964

Is there a better solution?

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

That was an awesome contest for me! After giving so much effort, i solved the c problem

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

I solved A, C1 and C2 but not B wtf?

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

Is this div2?

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

Trash round.

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

Felt difficult than almost all the div3 I participated in till now ...

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

F is much easier than E, and is too close to D, separating them by E was just evil.

Also, I skipped the first sentence of each problem since it add nothing to the statement, this also caused me to not notice that it has two versions...

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
void sol(){
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>p[i];
        a[p[i]]=i;
    }
    if(a[1]<a[n]){
        cout<<"Yes\n";
        return;
    }
    int mx=1,mn=n; 
    for(int i=a[1];i<=n;i++) mx=max(mx,p[i]);
    for(int i=1;i<a[n];i++) mn=min(mn,p[i]);
    cout<<(mn<mx?"Yes\n":"No\n");
}

I got an WA on pD but I don't know why. Can anyone help me? thx

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

I personally not satisfied by today's div3 :( Maybe I will get downvotes. I just shared my sadness

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

How tf is this a wrong edge list !?

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

I'm so happy to reach such a high place in this round! The thrill just won't go away!

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

C1 & C2 are nice problems! I was looking at C2 and had absolutely no idea how to do it but after a quick peek at C1 I had an observation that got me through C2!

Had it not been for C1 i would have been stuck at C.

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

Why would you want to make the mod 1e6 + 3 on G?

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

    Do you have a solution that does not require precomputing factorials?

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

      I missed this. You're right. Thanks for explanation :)

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

      If all the constraints are kept the same except for the mod (most importantly, $$$1 \leq a_i \leq b_i \leq 10^6$$$ is kept) and we only considered $$$t = 1$$$, I'm aware of a (partial) solution with two steps than can be done in $$$O(n)$$$ for the first step and $$$\tilde{O}(sqrt(mod))$$$ for the second step (per test case). This idea still requires precomputation, but only for factorials up to $$$b_i - a_i$$$, so we need an additional $$$O(max(b_i))$$$ precomputation. With $$$t = 1$$$, this idea can support mods around $$$10^9$$$, however it 1) cannot be used to solve G for significantly larger $$$t$$$ (I suspect $$$t = 10$$$ already causes TLE) and 2) is definitely not suitable for Div 3, for reasons I will explain later.

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

Can someone please tell me why my dsu code for D is giving WA? Submission:349981598

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

I gave this contest after registration properly. And it was my first contest. Then why it is appearing in unrated section and not in rated section for me? Help pls

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

I introduce a solution of problem E,but I can't prove it(maybe I just know a little) Firstly, make a number of (n/2)+1 called Rt , and continue ues it ,if it's a prime number,put in the first.And then,from 2 to n,make the number mutiples,every time chose two number,such as (prime number, a,b(a and b have mutiples relation)),continue to put such numbers,until Rt > n ,put other number using mutiples relation, ans you will pass the problem.

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

i was registered as unrated by mistake in Codeforces Round 1065 (Div. 3) .please check my submissions my name is Manisha0369

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

Can anyone tell / give any hints IN C problem in genral?

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

    try playing the game starting from the index 1 , think like u are the player playing the game and what optimal moves(swap) u need to play in order to :

    1. maximise(greater than ur opponent) ur score , meanwhile
    2. the swap operation must not increase ur opponents score so that ur opponent's score became greater than ur current score .

    or in more simple words , at the ith move , u can either choose to swap or not to swap. swap only if the operation increase ur score than current or it decreases ur opponents score.

    // here the easy version assumes only 0s and 1s hence the solution is a lil bit different , the above explained algo fits best with the hard version

    // C1 — easy

    /*
    code by - Aryan Shrivastav
    */
    
    /*
    observations : 
    
    */ 
    
    #include<bits/stdc++.h>
    using namespace std;
    
    #define ll long long
    #define vi vector<int>
    #define vll vector<long long>
    #define co_endl cout<<'\n'
    #define f(i,a,n) for(int i=a ; i<n ; i++)
    
    void SOLVE(){
    
        int n;
        cin>>n;
    
        vi a(n);
        vi b(n);
    
        string ans;
    
        int total_a = 0;
        int total_b = 0;
    
        f(i,0,n){
            cin>>a[i];
            total_a+=a[i];
        }
    
        f(i,0,n){
            cin>>b[i];
            total_b+=b[i];
        }
    
        f(i,0,n){
            if(i%2 == 0){ // ajisai turn
                if(total_a%2 == 0){ // total_a is even 
                    if(a[i]==0 && b[i]==1){ // swap
                        a[i] = 1;
                        b[i] = 0;
                        total_a++;
                        total_b--;
                    }
                    else if(a[i]==1 && b[i]==0){
                        a[i] = 0;
                        b[i] = 1;
                        total_a--;
                        total_b++;
                    }
                }
                else{ // total_a is odd // dont swap
                }
            }
            else{ // mai turn
                if(total_b%2 == 0){ // total_b is even 
                    if(a[i]==1 && b[i]==0){ // swap
                        a[i] = 0;
                        b[i] = 1;
                        total_a--;
                        total_b++;
                    }
                    else if(a[i]==0 && b[i]==1){
                        a[i] = 1;
                        b[i] = 0;
                        total_a++;
                        total_b--;
                    }
                }
                else{
                    // dont swap
                }
            }
        }
    
        int ans_a = total_a%2;
        int ans_b = total_b%2;
    
        if(ans_a > ans_b){
            ans = "Ajisai";
        }
        else if(ans_a < ans_b){
            ans = "Mai";
        }
        else{
            ans = "Tie";
        }
    
        cout<<ans;
    
        co_endl;
    
    }
    
    int main(){
    
        int t;
        cin>>t;
        while(t-->0){
    
            SOLVE();
    
        }
    
        return 0;
    }
    
    

    // C2 — hard


    /* code by - Aryan Shrivastav */ /* observations : */ #include<bits/stdc++.h> using namespace std; #define ll long long #define vi vector<int> #define vll vector<long long> #define co_endl cout<<'\n' #define f(i,a,n) for(int i=a ; i<n ; i++) void SOLVE(){ int n; cin>>n; vi a(n); vi b(n); string ans; int total_a = 0; int total_b = 0; f(i,0,n){ cin>>a[i]; total_a^=a[i]; } f(i,0,n){ cin>>b[i]; total_b^=b[i]; } f(i,0,n){ if(i%2 == 0){ // ajisai turn if( (total_a ^ a[i] ^ b[i]) > (total_b ^ b[i] ^ a[i]) ){ total_a = (total_a ^ a[i] ^ b[i]); total_b = (total_b ^ b[i] ^ a[i]); // swap int temp = a[i]; a[i] = b[i]; b[i] = temp; } } else{ // mai turn if( (total_a ^ a[i] ^ b[i]) < (total_b ^ b[i] ^ a[i]) ){ total_a = (total_a ^ a[i] ^ b[i]); total_b = (total_b ^ b[i] ^ a[i]); // swap int temp = a[i]; a[i] = b[i]; b[i] = temp; } } } int ans_a = total_a; int ans_b = total_b; if(ans_a > ans_b){ ans = "Ajisai"; } else if(ans_a < ans_b){ ans = "Mai"; } else{ ans = "Tie"; } cout<<ans; co_endl; } int main(){ int t; cin>>t; while(t-->0){ SOLVE(); } return 0; }

    do reply me if u got the approach and consider upvoting it :)

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

Why my C1 solution showing in queue ? Is this issue with other's also ?

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

(In China, CF1065 starts at 22:35)

Yesterday night: OK I passed A B C1 C2 D F

Then I go to bed

This morning: Yes I was not been hacked

(I had to do a stupid contest so I wasn't on CF in the morning)

In the afternoon: Let me see... Oh no FST on C1 C2 F

I wanted to see how I get hacked, then I see it was just in queue

me be like:https://cdn.luogu.com.cn/upload/image_hosting/3bz1srce.png

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

How to upsolve any problem, when i try to submit problem after contest is over while upsolving it says "Contest is Over" ???

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

i guess $$$O(m \sqrt m)$$$ memory gets passed in problem H (you just need to use 16 bit integers) 349971224

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

I’m new to cp and codeforces. I registered for this round and participated but I am seeing that it was unrated for me. I am confused because I didn’t choose to register as unrated and there wasn’t an option for choosing between rated and unrated (at least for me). I registered days before the competition. What might be the cause of me being unrated for the competition?

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

My rating is 1177 and had never got higher than now. I have solved at least one problem in at least five rated rounds, such as 1858, 1879, 1878, 2166, 2169. And I had never cheated in any round. But I wonder why it shows "Unrated allowed"?

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

how much more time for ratings to be updated?

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

Hello

Can anyone please help me to find cases in which mine code will fail (Give Tle) for problem — F It is giving tle on test case — 12 Thanks for helping

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int long long
const int mod = 1e9 + 7;
#ifndef ONLINE_JUDGE
#include "debug.h"
#else
#define deb(x...)
#endif
void solve();
signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll t;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}

bool check(vector<int> &a, int n)
{
    int mex = 1;
    set<int> st;

    for (int i = n; i >= 2; i--)
    {
        int ele = n - i + 1;

        st.insert(a[i]);

        while (st.find(mex) != st.end())
        {
            mex += 1;
        }

        if (mex == ele + 1)
        {
            return 1;
        }
    }

    return 0;
}

void solve()
{
    int n;
    cin >> n;
    vector<int> a(n + 1);

    for (int i = 1; i <= n; i++)
    {
        cin >> a[i];
    }

    if (check(a, n))
    {
        cout << "No" << endl;
        return;
    }

    set<int> st;
    vector<vector<int>> ans;

    for (int i = n; i >= 1; i--)
    {
        auto id = lower_bound(st.begin(), st.end(), a[i]);
        vector<int> rm;
        for (auto it = id; it != st.end(); it++)
        {
            ans.push_back({a[i], *it});
            rm.push_back(*it);
            if (ans.size() == n - 1)
                break;
        }

        if (ans.size() == n - 1)
            break;

        int size = rm.size() - 1;
        for (int j = 0; j < size; j++)
        {
            st.erase(rm[j]);
        }

        if (rm.size() == 0)
            st.insert(a[i]);
    }

    cout << "Yes" << endl;
    for (auto val : ans)
    {
        for (auto node : val)
        {
            cout << node << " ";
        }
        cout << endl;
    }
}
»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

how to solve D using DSU?

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

i cant write a comment here

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

    I have a very easy solution to c1 and c2, you just have to change the checking condition in the c2 version. Now it says that the play should be optimal, that means if it's the first player's turn and he is ahead in score , then he won't swap. Likewise , if he is down by one then on his turn if on swapping his score increases then only he will swap otherwise not. Second player would do the same. Therefore,the solution might be a very simple greedy approach where on the i'th turn, each player checks the score and then swaps.

    Now C1 SOLUTION----->

    [submission:349984404]
    

    The snippet shows that first we calculate the original xor of all elements,then on each move swap them. If the score increases like it can be 1 or 0 only. Then on swapping the score of both of them will become their negation.

    C2 SOLUTION -------->

    [submission:349987068]
    

    In the C2 problem, the score now won't remain 0 or 1, but the logic remains the same, first calculate the default xor of all numbers then the greedy approach to check on each move whether the scores will change or not. We just update the scores in different way in C2 because in C1 only 0 or 1 were possible pair of total xor scores. Thank You, Niksy

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

I missed that. As i am a beginner in here in codeforces.

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

Cloudflare engineer: Oh no, there's a bug! Quick, get GPT-5 to fix it!

GPT-5: Hey, I need Cloudflare to work properly!

Microsoft engineer: LOL

Codeforce: Hahahahahahahahahahahahahahahahahahahahahahahahahaha, kids, you're going to unrated again!

(Source: Luogu)

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

Hello, I received a plagiarism warning for solution 349932806 for problem 2171C1. I want to clarify that I did not share my code with anyone, nor did I use anyone else’s code.

I solved the problem by myself and only used my own template / common CP snippets that many users also use. If needed, I can explain my approach or share my local work.

Please review my case. Thank you.

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

Hello, I received a plagiarism warning for submission 349917059 for problem 2171D. I want to clarify that I did not share my code with anyone, nor did I use anyone else’s code.

I solved the problem myself. However, I used Ideone to test during the contest, and I later realized the code was accidentally left in public mode. This may have exposed my code and caused the similarity.

I did not share it intentionally. Please review my case. Thank you.

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

Hello — I received the plagiarism notice for my submission 349871347 to problem 2171B.

I did not copy other users’ code. I wrote the solution myself during the contest. To support this, My submission time for that particular question was 20:14 UTC +5.5 20 Nov 2025 and the other person's timing was 21:03 UTC +5.5 20 Nov 2025 I don't know the person and I have written my code myself If you look at the code, it is very simple so it has a high chance to coincide in my opinion

Please let me know if you need any additional logs. I’m happy to cooperate to resolve this. Thank you.

Here is my solution : ~~~~~ t = int(input()) for _ in range(t): n = int(input()) a = list(map(int, input().split())) if a[0] != -1 and a[-1] != -1: ans = abs(a[-1] — a[0]) else: ans = 0 if a[0] == -1 and a[-1] == -1: a[0] = 0 a[-1] = 0 elif a[0] == -1: a[0] = a[-1] elif a[-1] == -1: a[-1] = a[0] for i in range(n): if a[i] == -1: a[i] = 0 print(ans) print(*a) ~~~~~

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

Hello, I received a similarity warning for my solution in this round. I did not share my code with anyone or copy from anyone. It is possible that I once used an online IDE that unintentionally made my code public. I understand this is against the rules even if unintentional, and I sincerely apologize. I will make sure this never happens again. Thank you for checking.

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

very ezzz round for div.3

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

great one to perform but loss the pointtttt..

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

shoutout to the lesbians for this goated yuri themed contest

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

Tbh when i see a div 3 i smile it's easy and so amazing to pass , Hope they will be more div 3's by the time and also Good luck To everyone on this kind of contests or else !

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

That animation is so cool. I just love it