k1sara's blog

By k1sara, 13 months ago, In English
Photo of the authors back in 2019

Xin Chào, Codeforces! (☆^ー^☆)

We are thrilled to invite you to participate in Codeforces Round 1014 (Div. 2), which will be held on Mar/29/2025 17:35 (Moscow time).

This round will be rated for all participants with rating below 2100. Participants with higher ratings are encouraged to participate out of the competition.

You will be offered 6 problems and 2 hours to solve them. The tasks were authored and written by k1sara and sergeev.PRO. We hope you enjoy the challenge!

A heartfelt thank you to everyone who made this round a reality:

[UPD 1] The score distribution (now changed) will be as follows:

$$$500 - 750 - 1250 - 1750 - 2250 - 3000$$$


[UPD 2] EDITORIAL

[UPD 3] Congratulations to the winners!

All participants:

  1. ksun48
  2. potato167
  3. arvindf232
  4. conqueror_of_tourist
  5. maspy

Rated only:

  1. namcartoon06
  2. Milashka
  3. chanshin9211
  4. IuNgocBich
  5. abhaydixit500
  • Vote: I like it
  • +301
  • Vote: I do not like it

| Write comment?
»
13 months ago, hide # |
 
Vote: I like it +29 Vote: I do not like it

Excited!!

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

sigma

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

Wow, handsome authors! I believe this contest will bring us a perfect experience!

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

Hope to reach M.

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

Are you half Viet?

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

the authors be looking like a couple

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

istg this is the 3rd engage kiss fan i've ever seen in my life

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

Score distribution looks really nice ngl

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

"GL HF" is something I only see in the beginning of lose LOL game.

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

As a tester, I think that this round is very nice

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

orz, vietnamese's contest ._.

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

Xin chao !!! Very excited to do the contest

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

Very excited. Wish I can reached the next level!

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

Bro...

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

Tu noi dong xanh

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

They did danya111 bad xD

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

let's see how this one goes

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

Really love the "you" word colored in legendary grandmaster's colors. Feels really great to see this way.

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

Expecting Increase

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

based

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

for expertly coordinating the contest and offering invaluable guidance throughout the process

yeah... good one. I totally deserve it tho.

Sorry guys, and good luck with the round!

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

Hope for positive delta

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

As a tester, I am not sure how to kindly ask for contribution.

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

hope to reach expert

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

contest sigmaboy <(")

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

As a tester, good luck!

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

target to reach pupil

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

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

4th problem is 1500

so SPEEDforcessss...

[EDIT] — now we have different score distribution

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

WOW!!Nice~~~~~~

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

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

GOOD LUCK TO EVERYONE!!!

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

whoever knows this is a legend

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

look at my name

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

Excited!! I hope it will be a great and enjoyable contest and I can improve my rating.

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

Ông Từ Mentioned!!!!

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

this is a true Việt moment

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

Authors are busy in making the contest since 2019. xd

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

Hope to reach expert with the boys.

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

hoping for positive delta !!!

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

Hoping this time to get over the mark !!!

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

Score distribution seems nice

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

orz contest vn là phải chơi

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

Hoping to reach expert again : )

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

Glhf kids! I'm winning these

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

Nice try Pippy

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

plz hint for F im so lost

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

I enjoyed all the problems from B to E. Thank you for the contest.

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

800+ on E? Any hint?

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

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

nice questions and contest,ruined by cheaters :(

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

C,D > E

:3

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

Idk why but I cannot load standings... so I happened to not checking standings table at all.

After contest it's normal again.

But maybe thanks to this I focus more on coding and comeback at D (at least for pretest — praying).

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

Really enjoyed B and C. But the high submissions is clear indication of mass cheating!

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

https://mirror.codeforces.com/contest/2092/submission/313025446

can someone help why this failing on pretest 2

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

    can you explain your approach? not able to understand

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

      i am updating max possible even and odd number after each index like if the present a[i] is even then we can add it with max possible odd possible and then update odd with its sum and also update even as it may be possible to not add 1 in the end and as a result get an even sum and do the same if the present a[i] is odd

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

    test case 3

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

      you might want to tried this test case. 5 LLTII

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

        my code is giving -1

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

          answer is 4 3 4 2 2

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

            oh thanks Now I understand we can also make pair of character highest and second highest count even if it is not there.

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

              check my history, I WA 2 and WA 3 to actually arrived this test case and speed coding. Actually insane luck to made it at 1:54

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

        very nice test case. How did we handle such case? that we have to consider adding the largest element also? eg. i have sorted all 3 based on their frequencies i.e. L,I,T. But my code is also giving -1 on your test case. I haven't considered the case that we can/should add the character with the largest frequency also.

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

          Don't overthink it, brute force it. O(n^3) is acceptable since n <= 100.

          You can checkout my submission.

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

            can you explain your approach? not able to understand. What are you bruteforcing? I am not good at Python

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

              Sorted the frequencies of "L" "I" "T", I greedily pick the smallest one to try increasing it. But not the only smallest one, I tried them all by the order of frequencies. (brute force + greedy).

              The overall loop is 2*n since the problemset said we cannot do more than 2*n operations.

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

Standings not loading for me, is it a problem with my internet or everyone facing it?

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

D is rubbish.

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

    No, you probably just didn't find a simple way to think about it.

    Suppose you have different characters LI with the L at position i.

    Then with operations at i and i, you get LITI --> decrease relative frequency of L by 1

    With operations at i, i+1, you get LTLI --> decrease relative frequency of I by 1.

    Then, you just look for indices where the relative frequency of some character is larger that it should be and apply these operations.

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

      D isn't garbage because it doesn't have a good solution, it's garbage because it has tons of bad solutions which pass. Most submissions are clearly GPT written heuristics which somehow AC. Even if you assume the testing is strong enough not to let incorrect solutions pass, the fact remains that a majority of contestants who've written these solutions will be unable to prove their approaches provided a proof for their implementation even exists. There are many masters who didn't AC but tons of newbies, specialists and experts who apparently did.

      I think it was easily foreseeable that this would happen given recent contest trends, and it's a failure on the part of authors to not deal with it preemptively.

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

        Out of curiosity, what kinds of other heuristics did people use?

        I wonder if the problem would be "fixed" by making the complexity requirements more strict to force the simple solution.

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

        I didn't really find any solutions with GPT heuristics. I found some super verbose solutions like: https://mirror.codeforces.com/contest/2092/submission/313017676 and https://mirror.codeforces.com/contest/2092/submission/313014345

        These are "bad" solutions in terms of being needlessly complicated, but if someone writes and debugs them correctly, then fine. They also lost a bunch of time to solve E. I'm not aware of anyone with who wrote a bad solution quickly, as you'd expect from GPT.

        I think the contest was easier than typical (2C, 2D, 2E all are easier than normal), and that's a good thing considering that few legitimate Div 2 constants typically solve E and F. Unfortunately many people are worried about GPT cheating, so they interpret the increase in solve count as evidence of increased cheating.

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

          The question is just implementation. The naive brute forces passes, my implementation is O(tn^3), but passes in < 80ms. The solution is also just uninteresting, there are no observations, optimizations, or clever ideas involved. It's just straightforward simulation of adding characters to the string.

          Take a look at my submission for example. It's not particularly hard to write, but slightly tedious and boring.

          My submission

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

      Very smart.

      What is the motivation for thinking in terms of decreasing relative frequency rather than increasing it? Is it that the max operations is 2n acts as some sort of hint?

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

        Well yes, but my thinking in the contest was messier.

        At first I was also thinking about some greedy solution. In fact, I think I sort of proved that a greedy solution is possible (i.e. if the frequencies are a > b > c, you can solve it in $$$(a-c) + (b-c)$$$ operations). But the implementation details were messy, and I was wondering "is this really the intended solution?" The answer is obviously not, otherwise then there would be no reason to have the 2*n constraint.

        Then I wondered "what if I apply the operation twice at the same index?" and since I already had the idea of relative frequency from my idea about the greedy solution, I was able to make the jump.

        Also this sort of construction is common (max of $$$kn$$$ queries ---> do a $$$n$$$ step solution with $$$k$$$ operations per step). For example: https://mirror.codeforces.com/contest/1762/problem/D

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

I really think CodeForces needs stronger samples. Good problems with weak samples such as D can also bring bad feeling to those who got the correct algorithm but failed on corner cases.

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

[deleted]

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

Most submissions for D and E seem GPTd, both were casework heavy problems with even many of the seemingly non AI solutions seeming guesses at best

Also idk why the pretests were this lazy especially for these two problems

Bad contest

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

Can anyone give me a quick explanation to C's solution ?

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

    One observation is if a is odd and b is even, you can always make a = a + b and b = 0

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

    If you start out with only odd or only even towers you can't do anything and the answer is just the maximum.

    Otherwise, if you start out with odd and even towers, you can almost combine them perfectly, except you may have to leave behind a tower with height 1.

    Example: Towers of length 5, 4, 3. Combine (5,4) ---> (8,1), and then (8,3)--->(11,0).

    Notice that the total number of towers with odd height is invariant over all operations. So if there are initially x towers with odd height, the tallest tower can have odd height, and then there will be x-1 towers with height 1.

    So the answer is [sum of tower heights] — (x — 1).

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

D is just lame implementation. right?

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

I was excited to see my D work but also disappointed that it was just brute force greedy

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

My worst performance, back to 1850- again :(

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

i honestly could not figure out A and just guessed it

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

    if problem A simply hide test case

    3
    5 6 7
    

    It could easily be a B problem, tough for me too.

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

I would like to know where my code fails for problem C, IMO its not an elegant solution but should still work. https://mirror.codeforces.com/contest/2092/submission/313011156

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

    Your approach is correct, but it is not necessary that the answer fits into a 32 bit integer. Use long long instead

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

I messed up D

»
13 months ago, hide # |
Rev. 4  
Vote: I like it +1 Vote: I do not like it

why I cannot load the standings even tho every other page loads normally.

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

Just missing this single line on problem 'C' has ruined my night:

#define int long long

Now, could any of you show a little sympathy for me, pleeease...

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

Wow! Coder FeiWuLiuZiao competed in Codeforces Round 1014 (Div. 2) and gained +112 rating points taking place 184

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

it's funny how d.pippy is allowed to host parties at his home again now

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

one of the best div2 contests i joined. if i don't mind -19 rating change :D

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

Why is problem F's time limit so tight?

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

    The intended solution has a time complexity of $$$O(n \log n)$$$ and a memory complexity of $$$O(n)$$$. My solution runs in $$$\approx 300 \ \text{ms}$$$, so setting the time limit to $$$6 \times$$$ of that seemed sufficient. Also, the testers' solutions ran in under $$$400 \ \text{ms}$$$.

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

I got a system warning in this contest saying my code coincides with someone elses. I just wanted to say that that user got access to my account and he most likely used that to cheat. If you check he had submitted after I had