Блог пользователя wakanda-forever

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

Hello, Codeforces!

I am very excited to invite you to our contest Codeforces Round 1059 (Div. 3), which starts on 17.10.2025 17:35 (Московское время). You will be given $$$2$$$ hours and $$$15$$$ minutes to solve $$$8$$$ problems.

The problems were authored and prepared by wakanda-forever, wuhudsm, tridipta2806 and frostcat.

Note that at least one of the problems will be interactive. So if you are unfamiliar with them, please read the guide for interactive problems before the contest.

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 the number of problems solved, followed by penalty; wrong submissions will incur the usual penalty of 10 minutes, following the rules of educational rounds.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by the link, this is a compulsory measure for combating unsporting behavior. To qualify as a trusted participant of the third division, you must:

  • take part in at least five rated rounds (and solve at least one problem in each of them)
  • do not have a point of 1900 or higher in the rating.

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.

We would like to thank:

I wish you the best of luck, and I hope you enjoy the problems!

UPD: Editorial

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

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

Auto comment: topic has been updated by wakanda-forever (previous revision, new revision, compare).

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

As an author, I hope you'll enjoy the problems!

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

Best of luck to everyone — hoping you all see a nice rating increase !

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

Problems are really cool… would suggest everyone to give this contest and hope you enjoy it…

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

Participate or you will miss some truly beautiful problems.

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

As a tester, I can confirm this problem set is "beautiful".

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

As a tester, I was forced to write an as a tester comment

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

As a tester, -. . ...- . .-. / --. — -. -. .- / --. .. ...- . / -.-- — ..- / ..- .--.

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

As a tester, I can confidently say that this problem set is beautifully designed — it’s genuinely fun and a joy to attempt.

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

As a tester, regarding questions I would say only one thing, think DP but apply greedy, or maybe vice versa, hope everyone has fun solving problem, all the best :)

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

Excited to participate and get some positive delta

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

Hey all these days I dont understand what is specific color testing and what they do in general ?

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

As a tester, I can confirm you’re gonna have a great time giving this contest. Don’t miss it!

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

As a tester, I made a video of solving all the problems. I'll put the stream very soon on Codeforces, don't miss it.

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

A contest with Interactive Problems , its going to be GREAT again

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

18o3 the tester OTZ

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

As a tester, the problems are really cool and fun to attempt. I hope you all have a beautiful increase in rating.

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

what about the recent decrease?(rollback)

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

All the best everyone! Hope everyone gets +ve delta.

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

As a participant , seems interesting.

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

Is cry's basement already full?

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

As a participant, SHAW!

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

cout << "Best of luck CODERS for this round!" << endl;

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

Be Ready for one INTERACTIVE Problem. there will be one.

Here is guide for Interactive Problems.

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

According to the poor situation of QueueForces's submission now, will it be rated?

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

really excited to give an unrated round after a pathetic performance in last round.

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

hope to reach lgm this contest

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

div.3 ❌ div.2 ✅

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

All — Beautiful

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

How beautiful the problem are !

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

ConstructiveForces

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

how to H?

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

Oh my god. Please ban all unrated participants, I almost shocked when I see the common standings.

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

Multiple valid answers everywhere

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

Please ban the Unrated cheaters

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

the interactive snuffed me out, i hate those questions

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

constructive forces

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

No way G went from 200 to 700 in like 5 minutes. Regardless a good contest.

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

Is problem D not just binary searching over smallest L and largest R, where the condition is checking if query "1 mid mid" yields a different value from query "2 mid mid"?

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

Was E that easy? Please give some hints.

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

lol what is this standing?

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

Why did no sample case for B have a solution with a subsequence rather than a subarray?

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

я свел задачу H к следующему:

$$$f(a, x, l, r)$$$ будет однёркой если $$$x \le \text{min}$$$ || $$$\text{max} \le c$$$, иначе если x находится между мин и макс, тогда функция вернёт 0

тогда зная этот факт, можно для каждого X хранить 3 числа ls (кол-во чисел которые меньше чем i), eq(кол-во чисел которые равны i), bg(кол-во чисел которые больше чем i) (ls + eq + bg = n)

если существуют такие отрезоки [l1, r1] & [l2, r2] что (l1 <= l2 <= r2 <= r1) тогда [l2, r2] можно просто удалить и сделать m-1

если 2 отрезка пересекаются, то должно выполнятся одн из следующих условий: 1) назовем отрезок меньшим если все числа в нем <= i, иначе большим. Тогда оба отрезка должны быть либо большими, либо маленькими

2) если у них разные состояния, то все числа которые лежат на переечинии этих отрезков должны быть равны i

а дальше как решать я уже не знаю, только придумал как решить за $$$2^n$$$

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

Beautiful Permutation — Can someone help me in finding the issue with this code. I'm using binary search to find L and R.

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

    see first find the length of the updated subarray, this can be done by doing 1st operation on 1..n let it be A and 2nd operation on 1..n, let it be B, now r-l+1= B-A. now do BS to find r. now we know r-l+1 value, substitute r their to find l, we cannot do BS on both r and l since it would exceed 40 operations.

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

    This will take more than 40 queries , log2(2e4) is roughly 15 (14.28)

    So in your case 4* 15 > 40

    Instead find length using 2 queries by asking whole range sums from 1..n and subtract to get length

    and r = l + (len-1) . L you can find using bs.

    2*15 < 40

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

bro, i was just lost in life after failing C for like the 10th time, and then i read "u gotta use the current a not initial" pmo

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

So many bots! How will CF handle this? Will this game still be rated?

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

Really great problems. Enjoyed!

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

Open the status page, and set the filters as follows: Problem G, Verdict Accepted, Language Python3. Look at the submissions that were made just before the contest ended. All of them (literally ALL) are unrated (black) people, and the running time and consumed memory of those submissions are mostly uniform. I looked at some submissions and they looked all AI-generated. They are almost all cheaters.

Coordinators and admins, please look into them.

UPD: I've found that other problems are in the similar situation; generally Python 3 submissions are filled with cheaters.

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

Hello, Constructiveforces!

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

CHEATFORCES Today,left after solving 4 problems at a ~3.5k rank came back and saw my rank to be 4.9k changed within last 12 minutes of the contest wow , so so many cheaters so annoying dont know how to keep myself motivated having these things

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

This is my code for problem C:

// this is code


#include <bits/stdc++.h>
using namespace std;

int t, n;
int a,b;

int main(int argc, char const *argv[])
{
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    cin >> t;
    for(int q=0;q<t;++q){
        cin>>a>>b;
        if(b==0){
            cout<<1<<"\n"<<"0\n";
            continue;
        }
        if(a<b) {
            cout<<"-1\n";
            continue;
        }
        if(a==b){
            cout<<"0\n";
            continue;
        }
        int kq=a^b;
        if(kq<=a) cout<<1<<"\n"<<kq<<"\n";
        else{
            int k1=kq^a;
            int k2=k1^b;
            cout<<2<<"\n"<<b<<" "<<a<<"\n";
        }
    }
    return 0;
}

I need an explaination why it is wrong:(((( Anybody please help me:((((

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

Beautiful contest, we should have more mainly constructive contests!

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

344346152 344346149 344344898 344348892 344348159 344348061

What a coincidence that they have the same code and the same comments

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

how to prove that we always have a solution for problem G except when n=2?

is it related to pigeonhole principle?

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

Video Solution of A,B,C,D,E with C++ code of Codeforces Round 1059 (Div. 3): https://youtu.be/ty5y1geayPI

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

I was doing hacking and got the following message

Recently, your account was used to crawl. Please change your password to prevent your account from being used for unauthorized activities.

what can i do to avoid it??

Cause till now i have made only 26 hacks (15 successful)

on the other hand i have seen people make 300+ hacks , is there any trick

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

Just look at the rank list from 150 to 400, a very high density of black people. Submission pattern so random. I think someone made bot to submit with so many account or maybe a very mass cheating group.

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

the standing looks so strange. so many unrated participants with high score.

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

so cool that hundreds of xxxxxxx people had a stroke of genius​ in a few minutes and completed A-G, and their solutions are exactly the same. in early time you can find that every page of top ranks are full of these fk guys

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

Any idea why this logic is wrong for E?

Submission

In a nutshell, I am appending an element that is different from last two distinct elements.

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

As a Contestant, I still don't understand interactive problems. But very nice questions.

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

thanks for the contest!!!

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

Is Codeforces planning a roll back due to such obvious and impactful cheating?

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

I dont get it why my solution does not work, WA on testcase 2/53, can somebody have a look? Thanks

345461995