itz_pabloo's blog

By itz_pabloo, history, 7 days ago, translation, In English

Hello, Codeforces!

Codeforces Round 1109 (Div. 3) will start at Jul/14/2026 17:35 (Moscow time). You will be offered 7 problems with expected difficulties to compose an interesting competition for participants with ratings up to 1600. However, all of you who wish to take part and have a rating of 1600 or higher, can register for the round unofficially.

The round will be hosted by rules of educational rounds (extended ICPC). Thus, solutions will be judged on preliminary tests during the round, and after the round, it will be a 12-hour phase of open hacks. After open hacks all accepted solutions will be rejudged on successful hacks.

You will be given 7 problems and 2 hours and 15 minutes to solve them.

Note that the penalty for the wrong submission in this round is 10 minutes.

Remember that only the trusted participants of the third division will be included in the official standings table. As it is written by 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.

Problems have been created and written by itz_pabloo.

We would like to thank:

  1. MikeMirzayanov for Polygon and Codeforces platforms.

  2. Vladosiya for the excellent coordination.

  3. Friendiks and Nickir for their help in preparing the problems.

  4. k1r1t0, lewc, FairyWinx, zwezdinv for red testing.

  5. Sokol080808, cry, AI-qv4rk, KotlechkovEgor, Fakewave for yellow testing.

  6. SapeginIgor, dvb1r, VitaliiV, Gutark, feblokas, _liravel_, kaferius_cf for purple testing.

  7. Maria_Chudinova, Yassia, Wileyne, Algolagon, veliak, eyfxrby, sanya37y, opa, Neckt00 for blue testing.

  8. misha.arkhipov, s28b_shagabutdinov, Sava_is, nikk128, k_Teleport for cyan testing.

  9. sovenok1, HelloFromMars for green testing.

  10. mlovbnee for grey testing.

Good luck!

UPD: Editorial is out!

  • Vote: I like it
  • +229
  • Vote: I do not like it

»
7 days ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

this is the second div3 I've tested, and it's perfect

  • »
    »
    2 days ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    for Q3 approach is difference of index+1 and number on index should be divisible by x , y , gcd(x,y) if not divisible by any one of them then return NO else return YES is this correct approach

  • »
    »
    2 days ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    can anyone please share there approach for question number 4

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

      The key observation is to think about the final sign of each element. Traverse from right to left of the array and if that element is present in the second array, we need to check if we want to continue with the sign of previous element or not (if that element is present in second array then we can change its sign without effecting the (i+1)th element right ). Using a dp for that purpose gives O(n) solution.

      This is my first post, I am sorry if explanation is not up to the mark :(

»
7 days ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

went from being called a purple tester to now a blue tester :( round is great tho :3

»
7 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it
»
6 days ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Best of luck to all participants !? Hope that the contest will be very interesting!!

»
6 days ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

i just realized i have to sell 1108 to participate officially in this contest :<

»
5 days ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Its my first time participating in any contest

»
5 days ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

what are the rating points for the contest?

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

    Div 3, Div 4, and Educational rounds all use ICPC scoring, which means position is based on how many problems you solved no matter which ones, with ties broken by how fast and accurately you solved them

»
5 days ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Five Hundred Contests.

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

hey long time since the div 4 has been dropped, when is the next one happening?

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

Div. 3 rounds are always a great opportunity to learn. Thanks for organizing this one, and good luck to everyone participating!

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

Now I'm green and there's no green testing :)

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

Can anyone tell me what is this tester and setter thing.....I am new to cf so :)

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

    The authors of the problems are referred to as the problem setters

    The problem testers are the ones who try solving the problems and provide feedback for any required improvements. This is done across multiple user ratings to get an idea of what a participant will experience when solving the problem...

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

Thanks for the contest.

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

Guys, I came here to bless y'all with a meme... but apparently I'm too boomer to figure out how to post a picture.

Anyway, yk what? It's been 1 year and 9 months since I sold my soul to Codeforces.

For anyone wondering what the meme was, here's the image:

https://cdn.phototourl.com/free/2026-07-13-59de4156-eb8f-4c1a-908e-d172af317e59.jpg

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

»
3 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

First contest!

»
3 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

First contest in which I am going to take part in !

Excited :)

»
3 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

As an sc3developer, can’t wait to farm rating on this round, and also bees, because there’s so many bees

»
3 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

please suggest me , how i can develop my cp skill . which which algorithm should i know?

  • »
    »
    3 days ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    It's not about what algorithm you should learn, it's about can you use the things you learened effectively. A CM once told me that two pointers, binary search and DP are the only thing he needs to reach purple. I still don't know how to reach CM tho :sob:

    • »
      »
      »
      2 days ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Hello sir thanks for reply!

      Would you like to tell me how i can master the dp? I am efeciently working on my cp skill since 6 months. My first target is to become Specialist . Help me please! How many problem should i practice or is there any way to increase my thinking ability ?

»
3 days ago, hide # |
 
Vote: I like it +14 Vote: I do not like it

.

»
3 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

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

»
2 days ago, hide # |
 
Vote: I like it +23 Vote: I do not like it

comedy

»
2 days ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

thx for the good round

»
2 days ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

So grateful to Codeforces Round 1109 (Div. 3) for this round! It was pure joy from start to finish that I really couldn't have asked for a better experience!

»
2 days ago, hide # |
 
Vote: I like it -6 Vote: I do not like it

This round is more like a Div4 for me

»
2 days ago, hide # |
 
Vote: I like it +15 Vote: I do not like it

Great problems !

»
2 days ago, hide # |
 
Vote: I like it +18 Vote: I do not like it

one of the best div3 of this year!

»
2 days ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

How to solve $$$G$$$?

»
2 days ago, hide # |
 
Vote: I like it -7 Vote: I do not like it

The statement of F wasn't accurate.

No definition of a leaf, which matters because here the root could be a leaf.

Thank you for answering my questions. However, I think you should've made the problem statement more clear.

When I asked the setters, if the root of degree $$$1$$$ is considered a leaf, I received "Yes".

But then for the question if the root for a tree $$$1-2, 2-3, 2-4, 2-5$$$ is a leaf, I received that root is only a leaf if $$$n = 1$$$. How can this be inferred from the statement?

Except the inaccurate statement of F other problems were decent.

»
2 days ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

can someone help with G? i don't really know what's wrong!!!!! https://codeforces.com/contest/2244/submission/382686697

»
2 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

actually i am little bit dont understand TASK B

If i have 1 4 2 2, so why i cannot make 1 2 4 It will be anyway sorted, without any errors. I dont understand logic of this task

  • »
    »
    2 days ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    How will you make it 1,2,4 that doesn't make sense, the size of the original was 3 even if you meant like 1,2,4,2 well that isn't sorted either the best you could do is like 1,2,3,3. but then we have two elements that are equal. The array must be Strictly increasing

  • »
    »
    2 days ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    haha I had the same doubt too, you have to make the entire array increasing. You cannot ignore the last element.

»
2 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I am surprised that DSU is such a rare solution to Problem C and is not even considered as a tag for the same. I found it most intuitive and this was also similar to one of LeetCode problems.

»
2 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I am oficially the dumbest person ever. I used int for the sum in B and D and it caused overflow and it didnt work. Guess you learn something every day.

»
2 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

5300+ people solved Problem E. Looks like I'm the only dumb one.

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

    u need to construct two strings first one is going to store the differences between the original string and "10101..." second one is going to store the differences between the original string and "01010..." u need to get the number of blocks in these two strings.

  • »
    »
    2 days ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    17356 participants didn't solve problem E. Are you saying they are all dumb?

  • »
    »
    2 days ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    extremely similar to a recent codechef contest problem afaik

  • »
    »
    2 days ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Perhaps you could try prefix sums. I tried to derive how many groups of differences each flip can resolve, and the result is two groups. So we count the number of different groups within the interval, denoted as sum, and check whether it satisfies sum <= 2*k

    void solve(){
    	int n,m;
    	cin>>n>>m;
    	vector<int > a(n+1),b(n);
    	string s;
    	cin>>s;
    	for(int i=1;i<n;i++){
    		if(s[i]==s[i-1]){
    			b[i]=b[i-1];
    			b[i]++;
    		}
    		else b[i]=b[i-1];
    	}
    	//for(int i=0;i<n;i++) cout<<b[i]<<" ";
    	while(m--){
    		int x,y,k;
    		cin>>x>>y>>k;
    		x--;
    		y--;
    		int q=b[y]-b[x];
    		if(k*2>=q){
    			cout<<"YES"<<endl;
    			//cout<<q<<endl;
    		}
    		else {
    			cout<<"NO"<<endl;
    		}
    	}
    }
    
»
2 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

One of the best div. 3 of the year, all problems were so much fun!

I hope we can get more rounds like this

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

bro problem a and b felt like reading comprehension rather than problem solving

»
2 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

thank you for a good round

»
2 days ago, hide # |
Rev. 2  
Vote: I like it +7 Vote: I do not like it

Nice distribution of attempts over time, Assmaamr! Not cheater at all.

»
2 days ago, hide # |
 
Vote: I like it +13 Vote: I do not like it

was it only me or was A extremely hard to understand?

»
2 days ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Loved today's contest! The problem set was really interesting and fun to solve. Thanks for the great round!

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

hi, my account is new and this is my first cf contest, i'm currently unrated and i participated in cf round 1109 div.3 but could not solve even the A. Iskander and Drawings but i submitted a solution and it failed. will i get rated or i have to participate in other contests and give correct solution then only i'll get rated?

  • »
    »
    2 days ago, hide # ^ |
     
    Vote: I like it +1 Vote: I do not like it

    If you made at least one submission (even if it's wrong), then you'll be rated

    However, you need to submit at least one accepted solution in 5 different live contests to be a trusted participant of Div. 3

    note that "trusted participant" refers to the participants who are included in the official standings of the contest

»
46 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

guys does anyone know when we'll receive our ratings after each contest?

»
40 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can somebody pinpoint me why this D solution failed at systets?: https://codeforces.com/contest/2244/submission/382612368

i tired of losing my rating

»
40 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can anybody tell when my rating will be updated I am a new contestant and this was my first contest. Neither my name shows up in final standings in the leaderboard (as it shows only trusted participant). Will i be allotted a rating or not on the basis of this contest.

»
40 hours ago, hide # |
Rev. 3  
Vote: I like it +4 Vote: I do not like it

(The issue has been fixed by setter && coordinator) The hack #1178111 by Carnade for problem D violates the problems constraint. The problem states that every element of b is distinct.

Yet the generator they used to generate testcase fills the array B with value 131293.

The generator in question:

n=200000
#print (n,0,10**9)
mask = (1<<17) - 1
fill = int((1<<15)*1.3+1)
arr = [mask+2]*2
x = 6
for i in range(1,fill):
    arr.append(x)
    x = x * 5 + 1
    x = x & mask
arr.extend([131293]*(n-len(arr)))
arr.sort()
#max_value = 2*10**5
N = n
print(1)
print(N,N)
print(*arr)
print(*arr)

itz_pabloo could you please verify this??

»
39 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

I registered to the contest as rated, but after system testing it is showing this as an unrated contest for me. I just started the contest late, but during registration i did register as rated.

»
39 hours ago, hide # |
Rev. 2  
Vote: I like it +1 Vote: I do not like it

Hi itz_pabloo, I think there is a issue in Test Case 8 for Problem D. Duplicate b[i] are used which violate problem description. Check submission: 382633028

»
39 hours ago, hide # |
Rev. 4  
Vote: I like it 0 Vote: I do not like it

for 2nd question, this testcase: 4 46342 1000000000 73695632 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ....

is giving yes, i checked with:

#include<bits/stdc++.h>
using namespace std;
int main()
{
    vector<long long>v(46342,1);
    v[0]=1000000000;
    v[1]=73695632;
    long long sum=0;
    for(int i=0;i<46342;i++)
    {
        sum+=v[i];
        if(sum<(i+1)*(i+2)/2) 
        {
            cout<<"NO"<<" ";
            goto here;
        }
    }
    cout<<"YES";
    here:
    return 0;
}

why it is giving answer as NO , and above code is giving yes? can anyone tell?

»
38 hours ago, hide # |
 
Vote: I like it -15 Vote: I do not like it

itz_pabloo 2244D - Yaroslav and Productivity In D problem, My Code has been given TLE for test 7 even though my algorithm is nlogn which fits. Also Test 7 which seems to have all values of a and b as same. Which is not possible coz its given in the question that b has different elements. 382675252

Test 7 Input 1 200000 200000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -1000000000 -...

  • »
    »
    37 hours ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Array b doesn't have duplicates in test 7, this issue was only present in test 8 which is deleted already. The reason here is qsort being hackable, solution would pass if you wrote merge sort or proper qsort.

  • »
    »
    36 hours ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    The test case of test 7. $$$b$$$ doesn't contain duplicated elements.

    qsort is known to take $$$O(n^2)$$$ time for certain (carefully crafted) inputs.

»
36 hours ago, hide # |
 
Vote: I like it -15 Vote: I do not like it

Hello,

I received a plagiarism warning for this round and noticed that my submissions were marked as skipped. I would like to request a review of my case.

I solved the problems locally in VS Code using CPH for testing. I did not view or copy any other contestant's code during the contest. The only reusable coding pattern I used was a generic DFS that returns a struct containing subtree information, which is a programming style I had learned previously in class. The algorithm and implementation were developed by me during the contest.

If it would be helpful, I can provide my local source files, timestamps, or other development history that I have available.

I would appreciate it if you could review my case.

Thank you for your time.

»
35 hours ago, hide # |
 
Vote: I like it -12 Vote: I do not like it

Hello,

I am appealing the similarity warning concerning my submission 382658322 and submission 382683355 for problem 2244F - Anya Loves Trees!.

The similarity comes from the natural solution: process the tree bottom-up and maintain the minimum value, maximum value, and leaf count for each subtree. This leaves limited freedom in the main algorithm. Therefore, two independently written accepted solutions may use the same DFS structure, subtree interval calculations, and boolean validity checks.

The implementations are also different in an important part:

  • My code checks cyclic order by counting descents between consecutive child minimum values, including the last-to-first pair.
  • The other code checks whether consecutive child intervals are directly adjacent using mx[x] + 1 == mn[y].

Similar names such as st, mn, and mx are standard competitive-programming abbreviations for stack, minimum, and maximum.

There are also differences in data types, control flow, macros, variable names, and output handling. My coding style, indentation spacing, and input/output formatting remain consistent with my previous contest submissions, which is notably different from other submissions. This suggests that the alleged similarity is coincidental.

itz_pabloo , I respectfully request a manual review of the submissions and reconsider my submissions to make this contest rated for me. Thanks.

»
34 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Dear Codeforces team and round co-ordinators,

I received an automated system warning which says that my solution for problem 2244D (or Codeforces Round 1109 Div-3 question D) heavily coincided with other submissions. I am writing to clarify that I did not cheat nor did I leak my solution anywhere during the live contest round.

The high structural similarity is a coincidence arising simply due to the simplicity of the problem logic.

To prove the authenticity of my code, here are my details:

  • My Submission ID: 382654646

  • Language used: GNU C++20

  • Key Logic Explanation: — My design approach consists of the following steps: First, I sort the boundary array 'b' to ensure segments can be sliced from array 'a' (in a sequential left to right manner). Then, I maintain a tracking pointer 'last_idx'. As I iterate through the sorted boundaries, I use a sliding-window nested loop to aggregate the segment-wise sum of array 'a' directly from 'last_idx' up to 'current_boundary'. Every time, I take the absolute value of the segment-sum because each segment's sign can be independently flipped depending on whether we take that element from 'b' or not. Finally, I check if any trailing elements remain after the final boundary index and add them all up using a final linear pass.

Every step of my code is a simple chain of thought, and does things in the simplest possible fashion (and hence, similarity with other people's code may arise without seeing each other's code). I would highly appreciate it if a human coordinator or high-rated reviewer could look into my code to verify its authenticity.

Thank you.

Best regards, Arnav_Shandilya

»
22 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Katt1412 clearly used AI to cheat in div 3. Please check his submissions and do sth

»
22 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Dear Codeforces Team,

I am writing this as a clarification against a system-generated allegation on me for problem 2244E based on the claim that my solution "coincides" with others. About that, I would like to say that the so-called alleged coincidence is merely due to the simplicity of the solution for the problem. It is not difficult to see for a person familiar with CP and Codeforces that this problem is significantly lower than the level we expect in our mind for a Div. 3 E. You can also see that many other people are having the same issue for this contest in the comment section and their contest submissions are being changed from "skipped", which indicates a fault of the system which is fine, faults can happen but I request you to please understand my reasoning and please help me out of this.

My Reasoning: My first thought was "is the minimum number of steps required to make the garland beautiful less than or equal to k, or greater than k?" If it is the first case, then it's possible; if not, then it is not possible. Then the next thing I did was finding this minimum number of steps, where I realized that it depends on the current number of clashes. I derived the mathematical relations for that, then did the comparison, and accordingly gave the answer.

1) My submission : 382672226

2) Language used: GNU C++20

»
21 hour(s) ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Hey! I am new to CF and don't know much but I gave this contest and then got a message saying that my code was similar to others and my verdicts show skipped. I did not copy the code and its a pretty normal solution for the problem. It may be seen that the code snippets are similar but it doesn't necessarily means it is copied. What can I do in this situation?

»
13 hours ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

In Q3 , i thought that , for each given index i, it is connected to two another indexes as i + x and i + y. Now i thought that numbers at these indexes can be interchanged any number of times but their movement will be restricted to these indexes only, now since x and y are different , they can enable some index j , to also reach i + x or i + y, so i thought the problem as disjoint set , i made components by traversing the array and joined(i + x,i + y) , now in sorted permutation, the number and index are equal , so if for any index the array[i] and i are not in same component, the array cannot be sorted