chromate00's blog

By chromate00, 2 months ago, In English

Hello again! After merely eight days (personal record!) from my last contest, I gladly invite you to Codeforces Round 1082 (Div. 1, Div. 2) — which will be held on Feb/23/2026 17:35 (Moscow time)! For both divisions, you will be given $$$\mathbf{2.5}$$$ hours to solve $$$\mathbf{7}$$$ problems, where some problems may be divided into subtasks.

All problems of the contest are invented and prepared by myself.

I would like to thank:

The score distribution is as follows:

  • Div. 1: $$$(750+500) - 1250 - 1750 - 2250 - 3000 - (2750+1500) - 5000$$$
  • Div. 2: $$$750 - 1250 - (1000+750) - 1750 - 2500 - 3000 - (2750+2500)$$$

I wish you a thrilling experience in the round. Good luck and have fun!

UPD1: Added score distribution.

UPD2: Editorial (now complete!)

Also, congratulations to the winners!

  • Div. 1:
  1. tourist
  2. ecnerwala
  3. ksun48
  4. jiangly
  5. potato167
  • Div. 2 (Maybe subject to change when cheaters are found):
  1. JuanSign
  2. Joskmo
  3. rns_pis2
  4. Miaoborui
  5. foolnotfooling
  • Vote: I like it
  • +172
  • Vote: I do not like it

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

As a VIP tester, congratulations chromate00 for the very orz personal record!

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

As a tester, I can confirm chromate00 authored between 0 and 9 problems.

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

chromaid my beloved

»
2 months ago, hide # |
 
Vote: I like it -253 Vote: I do not like it

If my contribution back to positive, I will participate in this round, otherwise meh!
I am sick of this limitation because of low contribution:  I discovered this blog before any comment posted, I should be the first to comment if I'm not cursed like this :(

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

As an MVP tester, I demand a share of the author's compensation

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

A meme

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

strongest clash royale player js made another div

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

As a tester, chromate = chromaid

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

as a first time tester , wish you good luck and lot of positive delta

»
2 months ago, hide # |
 
Vote: I like it -10 Vote: I do not like it

Where will the basement be this time?

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

    I believe they will be sent to chromate's basement, where they will be forced to create new problems non-stop (how do you think he pumps out these contests so fast?)

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

I am glad to participate in your contest after eight days! Personal record (I'm participating chromate00's contests twice in 8 days)

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

As not a tester, problem A will not require XOR convolution in the intended solution

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

Back to back chromate rounds....so orz sir. Hope this one will be more good than the last one(it was good too :XD) :XD :XD :D :D orz orz orz chromate00

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

I'm going

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

Hope to reach my highest rating:)

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

Best of wishes to each contestant! Even though I’m not taking part.

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

34th comment

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

The problem A has 750 points instead of 500 in division 2... I don't know what will happen.

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

Hope to solve 3 problem

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

Hope to become specialist after this round

»
2 months ago, hide # |
 
Vote: I like it -8 Vote: I do not like it

I have lost streak due to this maintenance.I was continuously solved for the fucking 71 days but due the website only which was not my mistake ,I have lost this continuity.

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

    It is your mistake. They had clearly mentioned days in advance the exact from and to time of maintenance, which was not covering the whole day. If you really cared so much, you would have fixed a convenient time to solve at least one problem to maintain your "streak".

    But sure, lets blame it on the maintainers for doing their job, and not your ignorance :)

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

can't wait to see the editorial of div2B ... he he he !!!

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

    I found it very tricky but then I printed possible values and observed something and then just guessed based on that

    my observation was if we break string into chunks of 2.. both chars can't be same in a chunk .. and it passed pretests

    for me B >> both C

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

      This observation can be proved if we create a DFA of the states involved. These states would be involved:

      1. Odd length string starting with $$$a$$$
      2. Odd length string starting with $$$b$$$
      3. Even length string

      The transitions are

      • State 1 to State 3 if current character is $$$a$$$
      • State 2 to State 3 if current character is $$$b$$$
      • State 3 to State 1 if current character is $$$b$$$
      • State 3 to State 2 if current character is $$$a$$$
»
2 months ago, hide # |
Rev. 2  
Vote: I like it +6 Vote: I do not like it

Nice contest! <3 But… is this actually Div 2? It feels a little weird to me.

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

Very nice contest! I love problem B and C2, they are very cool :)

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

    how did you do B

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

      DP :skull

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

        whoa I didn't get idea of linear dp, can you please tell

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

        I thought dp would not work (tle) so didnt try it. was it standard dp or did you optimize it or something ??

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

          dp[i][j] means that at index $$$i$$$, is the prefix $$$[0, i]$$$ valid and the start and end of T is j ($$$j = 0$$$ : "$$$aa$$$" ; $$$j = 1$$$ : "$$$ab$$$" ; $$$j = 2$$$ : "$$$ba$$$" ; $$$j = 3$$$ : "$$$bb$$$")

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

        .

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

      invariant in parity of ?? continuous

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

      I did some bitmask magic to solve B: 364071388

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

        reading this code will kill my small number of brain cells .... aaaahhhh !!!

        can I please ask for mercy and request you to summarize the logic for me !!!

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

          There are 3 cases if in the middle of the process the string T is:

          • case 1: bab...bab: you can append at most 2 consecutive 'b' into S and can't append 'a' into S
          • case 2: aba...bab or bab...aba: you can append at most 1 'a' into S and at most 1 'b' into S
          • case 3: aba...aba: you can append at most 2 consecutive 'a' into S and can't append 'b' into S

          If n is odd, you start with case 3, if n is even you start with case 2

          Note that on case n, if you add a to S it will become case n-1, if you add b to S it will become case n+1, if ? is apper it means it can go to case n+1 or to case n-1, and after adding n strings to S, you want to end on case 2 (a and b is balanced).

          The bitmask part is not important, it is just to simplify writing the code. On my code case 3 (become mask 4 binary: 100), case 2 (become mask 2 binary: 010), case 1 (become mask 1 binary: 001).

          The bitwise operation become:

          • to go to case n-1 become binary right shift
          • to go to case n+1 become binary left shift
          • to go to both case n-1 and case n+1 using bit or for both logic above.

          If mask 2 is "on" at the end than it is possible, otherwise impossible.

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

            thanks so much for the explanation, I will try to understand the code with this

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

      Indexing is 0-based.

      If n is even, then for every k, we must have {x[2k], x[2k + 1]} = {'a', 'b'}. The reason for this is because if n is even, if we pick from the front we get 'a' and if we pick from the back we get 'b'. But, if we pick 'a' from the front, then the front and back are both 'b', so we are forced to pick 'b' next. If we pick 'b' from the back, then both the front and back are 'a', so we are forced to pick 'a' next.

      If n is odd, you have to pick 'a' first and then you are left with n — 1 choices. Since n — 1 is even, the odd case actually reverts to the even case.

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

        yeah I guess that makes sense

        • ODD becomes even after one step but that step is fixed as character at both ends is 'a'

        • for EVEN you can either take 'ab' or 'ba' and then it again becomes an EVEN case so that is why chunks for size 2 are formed

        thanks this helps me clarify the logic a bit.

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

nice contest, enjoyed problem D

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

B >>>> D

»
2 months ago, hide # |
 
Vote: I like it -21 Vote: I do not like it

$$$A$$$: Guess from testcases

$$$B$$$: Guess on your own

$$$C1, C2$$$: Good problem

$$$D$$$: Guess again

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

    man it wasnt a guess you simply had to figure out maths in a x can be just 4x+3y+2z and y as -x and z if you will run through example youll realise you need 4 only when y is negative you can make y as zero d wasnt guess again too

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

      Yeah should be, but my stupid brain that just woke up from sleep did spend ~30 minutes on problem A guessing the pattern:

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

    nah on B, I did dp :)

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

      i just iterated from end of string, after every 2 iterations count(a) , count(b) must be same for "YES" else "NO"

      also there are some edge cases for odd "N" so we need to write some conditions for it

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

    A is hard ngl QAO B is fun C1 is a little bit tricky, but i guess it's my problem C2 is easy when you solve C1 D just trick me with the sample testcase lol

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

fuck ass contest

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

Amazing contest!, problems were so cool and enjoyable ^_^

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

Felt A harder than B :(

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

    can you tell logic for B please ?

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

      From the problem title it can be guessed that we need to check the pattern "ab" throughout the string. and from rule 2 we can say that if starting element is "b" it will be appended to last, thus ending become *bb which denies the rule. Thus, using above 2 cases we can say if it can be formed or not.

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

      You can create an "aba..." string of the same length as the given string. Then, keep two pointers on this string one at the start and the other at the end. Simulate choosing the characters using these pointers. If we encounter a '?' and both pointers point to the same character, we choose that character. If both pointers points to different character, we check the next character in the given string and choose the opposite one to that. If the next character is also '?', you can pick any character.

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

I couldn't solve A :-(

Could someone please give me an idea on how to solve it.

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

    realize that using the 1st operation and the 3rd operation is the same than using 2 time the 2nd operation, so that makes you realize that when u use 1st operation u just ignore 3rd and work with 1 and 2 op, and viceversa, after that u just make the 'y' be the one u want and check if u can make the 'x' to be what u want too, then if u can it's 'yes' otherwise 'no'

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

      when i say to make the 'y' what u want i mean it only using 1/3 op, that depends in the sign of the 'y' in the input, after that u can only use 2nd operation

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

      Thanks!, i was so close still couldn't do it.

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

    Let $$$A, B, C$$$ be the number of moves of the mentioned types. Then we must have $$$(x, y) = A\cdot (2, 1) + B\cdot (3, 0) + D\cdot (4, -1),$$$ which is a system of equations over non-negative values $$$A, B, C$$$. Working out the system, you will get

    $$$B = (x - 2y) / 3 - 2C$$$ and $$$A = y + C$$$.

    Note that knowing the $$$C$$$ we will know $$$B, A$$$ using the above relations, in other words all solutions can be parameterized by $$$C$$$. We must ensure that

    • $$$C$$$ is non-negative
    • $$$(x - 2y)$$$ is divisible by $$$3$$$
    • $$$B$$$, $$$A$$$ are non-negative, which gives lower and upper bound on $$$C$$$ as $$$(x - 2y) / 6 \geq C$$$ and $$$C \leq -y$$$

    checking that all above conditions hold, gives the answer

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

    It was quite simple first bring y to 0 and change x accordingly and then check if x%3=0 ie if you can reach x with jumps of 3 which is 2nd operation.

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

      oh wow, did not thought about the problem in this way. This makes it so easier. Very Nice.

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

    Think of it as a 1D problem instead of 2D. First try to reac y from 0. y can be reached from 1st operation (if y>0) or 3rd operation (if y<0). after reaching y check if the x we reached after reaching y <= target x or not (if not then return NO). now we just need to check if we can reach to target x or not. there is two type of horizontal movements we can do.

    use operation 2 to move 3 steps

    use operation 1 and 2 both and move 6 steps

    as 6 is a multiple of 3 itself, there is no point of using operation 1 and 2.

    so simply just check if the remaining distance in x direction is a multiple of 3 or not!

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

can anyone help me on how to optimize double for loop or is my approach a bit off

https://mirror.codeforces.com/contest/2202/submission/364095248

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

Div2 E is very nice problem, if the contest is ~30 minutes longer, I think could solve it. I love "thinking >>> coding" problems <3 Thank you problem-setters :D

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

Omg absolutely epic round with epic problems but a bit hard for div.2 I think.

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

First step of D1D is the same as the previous ICPC East Asia Final task.

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

wtf why my $$$\sum d(n) \log n$$$ got tle on 1E

i spent 1h optimizing it but still can't get through, 3.5s is to narrow i would say

  • »
    »
    2 months ago, hide # ^ |
    Rev. 3  
    Vote: I like it +16 Vote: I do not like it

    I kind of wanted to make them realize that sum of $$$d(n)$$$ is $$$\mathcal{O}(n \log \log n)$$$ and therefore the time complexity is fine, and then there's bitset solutions that pass within the TL unfortunately

    That being said all of our intended (including tester's) solutions pass in around $$$1.5$$$ s or less

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

C2 baited me to solve it, D was so much easier compared to it :tears:

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

Like the problem C2!

But missed D because of a silly miscalculation! :(

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

could anyone give me a hint on how to solve c1 .

i tried using below method

~~~~~~~~~~~ ll n; cin>>n; vector v; for(int i = 0 ; i <n ; i++){ ll temp; cin>>temp; if(i==0){ v.push_back(temp); continue; }

if(v.back() != temp) v.push_back(temp);
}

ll m = v.size();
vector<ll> dp(m,1);
int i = 1;
while(i < m){
   if(v[i]-1 == v[i-1]){
       ll maxi = v[i];
       ll mini = v[i-1];
       int j = i;
       while( j < m && v[j]-1==v[j-1]){
        maxi = max(maxi,v[j]);
        j++;
       }

       while( i < m && v[i] > mini && v[i] <= maxi){
        dp[i]=0; i++;
       }
   }
   else i++;
}

ll ans = accumulate(all(dp),(ll)0);
cout<<ans<<endl;

~~~~~~~~~~~~~

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

cheating situation is insane because i do NOT believe there's almost twice as many div 2 people that solved 1F1 compared to div 1 (and almost the same amount on 1F2)

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

Today I learned from 1D that if s is a set/multiset, s.erase(s.end()) runs forever (at least on my laptop)... Thankfully I still solved it in time regardless.

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

D was good, I loved it

couldnt solve it in time but solved it using queue

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

I think stepanov.aa getting -60 is a bit sus

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

Loved the contest!
Although couldn't solve E in time, but still liked it

Somehow i got negative delta, AI is improving so fast...(

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

    I'm curious, if today's bleeding edge AI is rated, will it reach grandmaster level?

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

      considering AI can AK today's div2 (which is around top 2 div 1 performance with extreme speed which AI is really good at), 100%

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

https://mirror.codeforces.com/contest/2202/submission/364120605

this is my submission for C1 can anyone tell me where i am getting it wrong

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

    Try this input to your program:

    1
    6
    1 2 3 4 2 4
    

    Expected answer: 2
    Your answer: 1
    You can't make sequence [1, 2, 3, 4, 2, 4] with just [1]!

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

C is absolutely trivial but I unfortunately wasted an hour trying to solve a misinterpreted version of it. I thought that you could only insert increments after the original m elements.

So, for example, for b = [1, 2, 3], f(b) = 2. But for b = [1, 1, 1, 1, 1, 2, 2, 3], f(b) = 6.

Oh well. Hopefully problem statements will be clearer in the future.

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

Does anybody know how hard the Problem D ( of Div.2 or problem B or Div.1 Recollect Numbers) is? It hasn't been shown in "tags"

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

--

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

chromate00 I am just curious why Div1 E wasn't included in Div2 as well. I guess the most obvious answer is the constraints on number of problems, but I believe that Div2 G1 and G2 were too difficult to have 100+ ACs (considering that most of the cheaters who submitted G1 only would have passed G2 as well). So, wouldn't be including Div1 E as Div2 G was better; or setters decided that convolution was a hard topic for a usual Div2 participant to know?

Just my opinion and assumptions, would love to know the thought process behind it.

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

    During testing phase we believed that Div2G1 < Div1E (the intended solution of Div2G1 is bitsets), and so I thought this change would allow more legitimate participants to get an interesting contest experience rather than a big difficulty spike (which, as I feel, many Div.1 participants are okay with difficulty spikes around late contest as it happens all the time?)

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

Why is the ranking shown on my profile page (4320) inconsistent with my ranking on the overall contest leaderboard (1471)?

Also, the virtual rating I calculated using the Carrot plugin is 1610, but my rating seems to have been adjusted based on the ranking shown on my profile page instead. Was there a mistake?

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

Hi, can somebody explain me how rating updating works?

I got -2 rating after round. In my profile you can see that I am on 1648 place. But if you open Div2 standings, I am on 343 place, and other participants with my rating received a positive delta.

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

    Hello, it wasn't explained in the announcement (because I wasn't notified so), but it looks like there was a trusted participant standings only in Div. 2. The rank you see in Friend Standings is your actual rank that includes un-trusted participants.

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

      In Friend Standings i am on 343 place too :(

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

        Huh, weird......... I'll ask the admins to look into this matter

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

        We've looked into this matter, it seems that the ratings were updated when a few submissions were left in the queue. We'll make sure that the ratings are correctly applied, you'll certainly see the changes when the rating recalculation happens.

»
5 weeks ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

Why the difficulty of F2 is lower than F1?