AksLolCoding's blog

By AksLolCoding, 2 months ago, In English

Hello, Codeforces!

I am exhilarated to invite you to participate in Codeforces Round 1084 (Div. 3), which will be held on Feb/27/2026 17:35 (Moscow time)! You will be given $$$7$$$-$$$8$$$ problems to solve in $$$2$$$ hours and $$$15$$$ minutes. All problems were authored and prepared by me.

The round will be hosted by rules of educational rounds (extended ICPC). During the round, all solutions will be judged on preliminary tests. 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. There will also be the usual penalty of 10 minutes for each wrong submission.

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:

  • participate in at least five rated rounds (and solve at least one problem in each of them)

  • 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).

Please note the rules restricting AI use. All violators will be sent directly to cry's basement, which does not have any air.

I would like to thank:

Good luck to everyone and I hope that you enjoy the problems!

Update: Editorial!

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

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

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

  • »
    »
    7 weeks ago, hide # ^ |
    Rev. 2  
    Vote: I like it -8 Vote: I do not like it

    Dear MikeMirzayanov and AksLolCoding,

    My disabled account is HuuBach, and the email associated with it is bach123456789101112131415@gmail.com.

    I am writing regarding the recent ban on my account related to Codeforces Round 1084 (Div. 3)

    I would like to acknowledge that I violated the contest rules. I fully understand that Codeforces enforces strict standards to ensure fairness for all participants, and my actions were inconsistent with those standards. I take full responsibility for my mistake.

    I sincerely regret this behavior. Codeforces has been an important platform for my learning and development in competitive programming. If there is any possibility of reconsideration, I would be very grateful for a second chance. I am willing to accept any reasonable conditions, such as rating reset, removal of affected results, or probation.

    I assure you that this will not happen again, and I will strictly follow all contest rules in the future.

    Thank you for your time and consideration.

    Best regards, HuuBach

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

hopefully this contest will make me nut

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

As a second time tester , i wish you 2 * lot of positive delta

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

I hope this contest will be rated for me :3

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

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

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

As a tester, gud luck and have fun.

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

As a tester, I will become a Magenta Tester next time

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

As a tester, I hope no problem spikes your cortisol.

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

As a tester, this contest is so good that I've took out a 1e9 dollar loan to give to AksLolCoding in order to thank him for bestowing such beauty on CodeForces.

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

Me with my M265 Oxygen tank:

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

i hope this contest will go good

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

Good luck on Div 3!! Special support to testers! Show some high performance tomorrow, guys. May the force of competitive programming be with you! Don't pay attention to my avatar!!!

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

Hoping this div-3 will be exciting! Good luck to all..

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

I have but one thing to say AksLolCoding

Div2F(3).pdf

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

C is a trash

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

    you are commenting in the wrong blog

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

    bruh..... C is good problem, if you mean Codeforces Round 1083 (Div. 2), even if i don't able to solve it. Try to motivate the setters, even if one problem bad. Don't let one problem change your opinion about the round.

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

its so peak

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

Silver Testing..? Faaaaah..! By the way nice initiative to support new programmers and involve them in official tasks. Giving testing responsibility is a big learning opportunity. Keep it up!

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

AksLolCoding did you use div2 F(3).pdf?

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

as not a tester I can say that div2 F(3).pdf was the best problem that AksLolCoding has got

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

404!

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

As a tester div2 f(3).pdf

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

3 contests in a row.

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

i hope, i will become expert again in this contest

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

As a tester, gud luck and have fun

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

As a participant, I hope this contest will be amazing contest AksLolCoding :)

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

Thank u AksLolCoding for DIV 3 and thank for all participants IS cry's Clash royale addiction so bad

Also GOOD luck for all in DIV 3 !! ^_^

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

Hey Guys, I am new to codeforces. Can anyone help me in codeforces?

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

    Welcome! Codeforces is an excellent platform for practice. To get started, solve problems from the archive (start with those with a low rating), participate in Div.3/Div.4 rounds, learn to analyze other users' solutions, and don't be afraid to make mistakes. Study basic algorithms and data structures to improve your rating.

    Key Tips for Beginners: Start with the "Problemset": Choose problems with a specific difficulty (e.g., 800–1000) and sort them by the number of solved tasks (from most to least).

    Participate in Rounds: Don't be afraid to take part in rated rounds (especially Div.3, Div.4, or Educational), even if you only manage to solve one problem.

    Upsolving: After a round, be sure to read the Editorials and solve the problems you weren't able to finish during the contest.

    Master the Basics: Understanding fundamental algorithms (sorting, binary search, basic data structures) is more important than knowing complex, advanced techniques.

    Language Options: Problems are available in both Russian and English.

    Good luck with your training!

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

"participate in at least five rated rounds (and solve at least one problem in each of them" what does it mean? i created this handle when i was in school but now i am in university that's why i am fully focused on coding. i didn't participated any contest earlier. will i be rated if i attend this contest?

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

I hope this Div3 allows me to cross 1000 rating,currently 850

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

as not being a tester, i can confirm that this is codeforces.com

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

Hi,I have used AI in some of my submissions during contest, can u help me to disable my account?

I want to start everything from the beginning with honesty

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

Going to participate after the long break

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

Good luck to eveyone on this round!

Waiting for fair performance from all participants.

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

easy question, easy question, easy question, WHAT THE FUCK is that question, I feel after banging my head and getting -4 I am starting to hate the concept of Portals.

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

    Second that.

    The solution that I could think of was a long if else construction or rather like some sports-tournament match table... like

    1. check (l1 vs r2) vs original = result1
    
    2. check (r2 vs l2) vs original = result2
    
    3. check (result1 vs result2) = finalist
    

    Finally to wrap it up... check -> if this finalist could be reduced to a lexicographically smaller value using either of those two operations.

    Checking the Tutorial as I speak... (curious 3000)

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

      The solution hinges on the fact that the array inside the portals and the combined array to either side act as separate entities. Since each element is unique, we should just rotate the inside array until the smallest element is at the front (call the smallest element a).

      Then shift all elements outside the portals to the end of the array until the stuff in front of the first portal is all less than a.

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

Romantic color name and interesting basement! good luck and enjoy the round

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

why so many 67 in this contest ToT

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

Can any1 give the hint for E

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

    there are 2 "cases", think why and how alice can force something into a position that when touched again will result in it being impossible for the array to become nondec, and in the case it is not possible, think of a pattern that every element must follow

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

      i thought of that

      if arr is sorted after expanding to all prime nums -> bob wins if a num has more than 1 prime divisor -> alice wins

      if after expanding all nums's prime divisors , if divisors are in dec order for eg ( 5 9) -> alice wins

      else bob wins (keeping in mind arr is in inc order)

      but stil getting wa 2 :/

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

        then its correct? well you also have to check that the array is intially sorted but yeah

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

        I think your factorization code is slightly off. Consider the example 1 4 8 4. Bob should win this, but I think your code will return Alice?

        Edit: I just looked at it again and I take it back, it seems right to me. Sorry about that

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

          its still giving bob

          i dont know what am i missing

          will try to figure out :))

          thanks!!

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

            Think of this test case 1 49 8.

            Your code will give answer as Bob , but in reality Alice won the game.

            I think you just wrote till if distinct prime factor exist or not. But I guess we need to check the order of max prime factor of each element. I am also stuck with you :(

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

        Imagine [2, 1]

      • »
        »
        »
        »
        2 months ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it
        ``cpp
        #include <bits/stdc++.h>
        using namespace std;
        
        void solve()
        {
        
            int n;
            cin >> n;
            vector<int> v(n);
            for (auto &i : v)
                cin >> i;
        
            bool chk = false;
            for (int i = 1; i < n; i++)
            {
                if (v[i] < v[i - 1])
                {
                    chk = true;
                    break;
                }
            }
        
            if (!chk)
            {
                cout << "Bob\n";
                return;
            }
        
            int mx = -1;
            for (int i = 0; i < n; i++)
            {
                int x = v[i], cnt = 0;
                int f = -1; // for handling primes and 1
                for (int j = 2; j * j <= x; j++)
                {
                    if (x % j == 0 && j < mx)
                    {
                        cout << "Alice\n";
                        return;
                    }
        
                    if (x % j == 0)
                        mx = max(mx, j), cnt++, f = j; // track factor
                    while (x % j == 0)
                    {
                        x /= j;
                    }
                }
                if (x != 1)
                    cnt++;
        
                // here check if x is prime
                if (cnt > 1 || (f == -1 && x < mx))
                {
                    cout << "Alice\n";
                    return;
                }
        
                mx = max(mx, x);
            }
        
            cout << "Bob\n";
        }
        int32_t main()
        {
            ios::sync_with_stdio(false);
            int t;
            cin >> t;
            while (t--)
            {
                solve();
            }
        
            return 0;
        }
        ```
        

        your code fails for testcases like: 1 37 3. since no j divides 37 in loop it exits and the condition for checking max fails you need to check whether it's following non-decreasing order separately

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

    if array is sorted, Bob wins.
    else if there is any number in an array which has 2 distinct prime factors Alice wins
    else if the array is sorted based on prime factor Bob wins
    else Alice wins

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

      I'd like to express my thougrs in chinese because my English is not good. Bob能赢只有两种情况:1.一开始就赢了 2.a[n]中所有的元素都是p[i]**k[i]的形式(p是质数,k是整数),并且i<j时,p[i]<p[j].不知道我说得对不对

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

    Ignoring the obvious case where the array starts sorted, Alice can pretty much guarantee a win on her first move in nearly every setup.

    I'll leave it to you to figure out what the criteria is :)

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

Good contest. Stuck on D.

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

    it was just mostly implementation

    we can observe that 1 2 3 | 4 5 6 | 7 8

    we can only play with [4,6] segement differently

    and solve the combine segment of [1,3] + [7,8] differently

    with checking with the first element of the middle segment

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

Problem $$$F$$$ is implementation hell, but a good problem though.

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

    I wasnt able to think any logn implementation, i solved(worst solved) precalculating answer for every reactivity and then O(n) calculation again with shop particle and check it with precalculated (anyways precalculation is N2 and again N2)

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

F was too implementation heavy... though I could code up most of the approach imo, couldn't finish in time

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

364713283 why this is giving WA my approach -> there will be 3 cases 1-> 1...P.. P .. 2-> ...P..1..P.. 3 -> ..P...P..1 in 2nd case we have no other choice other than placing 1 at top and maintaining order of other element in 1st case elements between P's we place min element just after 1st P and compare right of 2nd P to first element after 1st P i.e px + 1

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

    no cases bro, imagine as pre_mid_post and rotate mid till min comes first and then just adjust pre values to post by checking if val < min_from_mid

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

I loved the contest, for the first time I was able to solve till E problem in Div3.

Thanks AksLolCoding for such an amazing contest <3.

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

I like F,it's also very suitable to be divided into 2 parts,with or without queries.

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

My thinkflow for problem E is as follows.

My first observation was, if there exists an even number that is NOT a power of 2 (2^k), Alice always wins. In this case, there will always be an odd prime factor, let's call it 'x'. Alice simply waits for her turn, factors that number into x * 2^m, and arranges them as [x, 2^m]. On her subsequent turns, she continues to break down 2^m into [x, 2, 2, 2, ...]. Bob loses because the sequence is no longer non-decreasing (since x > 2). Since Alice goes first, she can always force this strategy => Guaranteed win for Alice.

Therefore, only two cases remain: all odd numbers, or odd numbers + even numbers that are powers of 2.

If the array is all odd, Bob still loses if the initial array is not non-decreasing (i wont go in details)

=> In short, the only way for Bob to win is if the array follows this pattern: [1, 1, 1 ... 1] (a sequence of 1s, or empty), followed by [2^k, 2^m, 2^n, ...] (must contain at least one element of form 2^k), followed by [a sequence of increasing odd primes] (or empty).

And then, I just realized I was wrong. There are also numbers like 3^a, 5^b, etc.

The array must actually follow this format: [1s], [elements of form 2^a], [elements of form 3^b], ..., [elements of form (max prime <= 1e6)^z]

In other words, if we transform each element into its "prime base", the resulting sequence must be non-decreasing.

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

There is some gap in fairness of rating function. If the contest is rated till 1599, and guy with 1590~99 takes part and achieves top 100, they can reach up to 1700. But, people with rating 1600~50 loose these chance to +ve delta.

I think, here solution is, rating increments above the threshold should be capped (say threshold + 50).

if current rating is 1590, and +ve delta is 150, then you should get min(threshold + 50, current + delta).

By adding such capped delta, we can bring fairness to people who are just above threshold and marked unrated.

I am not saying it because this is unrated for me, but I was having discussion with my friend and we both had similar opinions. PS : Peace.

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

Hello

Does someone know why when we triyed to hack, they said "Page is temporarily blocked by administrator" ?

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

F felt like two big problems , combined into 1

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

I am scared of any question which has the word permutation in it. Couldn't solve D, tried E but sucked.

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

aaggh!!

Damn the python dict hack had to ruin it

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

Authors got hacked on F. Please adjust your code so unexpected verdicts go through.

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

zalupa

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

Thanks to all who made this contest. I was trying to get back to CP and this was a pretty decent contest. Thanks again for boosting me and keeping me encouraged.

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

E was peak

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

Can anyone tell me why i am getting wrong on test case 2 in F?

code

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

Hello, I participated in the this Div. 3 contest 1084, but it seems that it was not counted as rated for me. As far as I remember, I did not select the “participate as unrated” option. However, after the standings were finalized, my rating did not change. Could someone please check if my participation was marked as unrated by mistake? Sorry if I am missing something, I am still relatively new to contests.

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

Why did the contest become Unrated?

»
7 weeks ago, hide # |
Rev. 3  
Vote: I like it -8 Vote: I do not like it

Dear MikeMirzayanov and AksLolCoding,

My disabled account is HuuBach, and the email associated with it is bach123456789101112131415@gmail.com.

I am writing regarding the recent ban on my account related to Codeforces Round 1084 (Div. 3)

I would like to acknowledge that I violated the contest rules. I fully understand that Codeforces enforces strict standards to ensure fairness for all participants, and my actions were inconsistent with those standards. I take full responsibility for my mistake.

I sincerely regret this behavior. Codeforces has been an important platform for my learning and development in competitive programming. If there is any possibility of reconsideration, I would be very grateful for a second chance. I am willing to accept any reasonable conditions, such as rating reset, removal of affected results, or probation.

I assure you that this will not happen again, and I will strictly follow all contest rules in the future.

Thank you for your time and consideration.

Best regards, HuuBach

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

G is awesome

»
7 weeks ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

yay i was able to do E

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

in t5, test two, right?