_LeMur_'s blog

By _LeMur_, 2 years ago, In English

Hi, Codeforces!

I'm glad to invite you to take part in Codeforces Round 917, which will take place on Dec/24/2023 17:35 (Moscow time). Round will be rated for participants with rating less than $$$2100$$$. Participants from the first division can take part out of competition.

There will be $$$6$$$ problems for $$$2$$$ hours. The problems are authored by IgorI, zidder and me.

Part of the problems in this round were in the Yerevan SU 28.1₀.₂₀₂3 Contest. If you participated in it or know at least one problem from it, please refrain from participating in this round.

We would like to thank

Scoring distribution: $$$500 - 1000 - 1500 - 2250 - 2500 - 3000$$$

We hope you'll like the problemset! Good luck and have fun!

UPD 1: Editorial

UPD 2: Congrats to our winners:

  • Div1 + Div2
  1. tourist
  2. Sugar_fan
  3. BurnedChicken
  4. Rubikun
  5. kotatsugame
  • Div2
  1. -Misaka-Mikoto-
  2. _chashuibiao_
  3. needy_and_sorry
  4. Godjob
  5. LordVoIdebug
  • Vote: I like it
  • +281
  • Vote: I do not like it

| Write comment?
»
2 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

]

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

Great!!!

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

As a tester, I recommend trying all of the problems (really good ones). Also I wish everyone positive delta as a Christmas present:)

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

I will try it!

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

^_^

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

As a tester, I want to reach pupil after this round

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

Looking like speedforces:( because D is 2250.

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

hggnigan This round is good?

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

CM TIME

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

participate cf contest on Christmas Eve (east Asia time) this is really a round 😂

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

Big point difference between C and D

»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it
╱|、
                      (˚ˎ 。7  
                       |、˜〵          
                      じしˍ,)ノ
»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Hopefully I become a master after this contest!

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

Maybe I can reach specialist by the end of this year :)

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

    Mate you just missed by 2. Maybe in rechecking later it may increase.......

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

      Yeah, was almost there... maybe next time

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

      And I'm confused how the hell on earth did your code for problem C got accepted...I just copied and ran your code and it's showing WA on testcase 38

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

        Can you tell me what did you change to get it accepted?

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

          Just ran the outer loop till d rather than min(d,max(n,k) and then checked inside the loop if n+(d-i-1)/2<=current_answer then simply break as checking beyond it wont give the maximum answer. Because the max n can go upto is 2000 where as d can go till 1e9.

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

            I found that if I run the loop till min(2*n,d) it works.

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

As a tester for the 1st time,i feel proud.

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

Yo

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

Hope to become Expert.

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

I will finally give a Cf contest. Lets go.

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

As a contestant,I want to reach pupil after this round btw

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

best wishes for every one

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

Clicked me now, why all are LGM here

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

As a kawazaki I will participate

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

AbduSaber First tester from Sohag, Egypt :) , remember this name very well -_- .

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

Hope to solve all the problems!

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

As someone who has a birthday, please give me a contribution.

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

Really weak sample for C. Is it fun to see players wa2 again and again?

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

my last unrated contest

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

Hope will become expert

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

unbalanced forces !

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

Defeated by constructive round. so sad.

update: now I'm defeated by the FST XD

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

Am I missing something or does D effectively boil down to:

  • Calculate inversions within P.
  • For each i, calculate number of values in P which would be its inversion for relative power shifts between -20 to 20.
  • Iterate over values of Q, and check how many occurances of [Q_i — 20, Q_i + 20] lie before it and add them to the answer.

I spent 15-20 mins thinking of how to simplify this to something I could implement without going insane before giving up and going to problem E instead...

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

    Had the same idea, how are you calculating the inversions for relative power shifts? My approach ended up double counting many things

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

    You don't need to simplify this to anything else. You can calculate this directly

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

      I mean "simplify" the implementation so I don't go insane implementing this. I seriously doubt I could code this in less than an hour with all the debugging from minor mistakes that are likely to occur. It feels like a 10 mins to think, 1 hour to code problem.

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

Whoever made C deserves lifetime sentence in jail.

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

How to approach B?

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

    Sum of the first occurrence of each character is the answer. Suppose we have s = "abeakf". Then if we consider 'a' is the first character, we will have ["abeakf", "aeakf", "aakf", "akf", "af", "a"]. We only need to care about the first position of character 'a' in s, because if we tried to used the second 'a', the result string will be duplicated (these are "akf", "af", "a")

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

    Essentially, the only difference between strings after "i" operations is the first letter. That's because you can't reach the other characters through these operations. However, that initial letter could be any letter present in the prefix of length "i" of the original string. So, you calculate the number of unique letters in each prefix and then sum them up. That's basically the answer.

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

    check the string from left to right, if i th character has not appeared before, answer += n-i

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

    I thought of that in this way. Suppose you have a string "ayush",now if you want to find all the strings of size '4', "ush" will always be there so the string will be "_ush" now for the first character look at how many distinct characters we have encountered before we reach 'u' (2), so there are two possible choices for the first character. Do this starting from size 'n' to size '1'. Hope this makes sense to you!

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

still don't know why in C, when I tried to iterate min(n, d) times, it gave me wrong answer, since I thought it is enough to make the array big. I used a large number instead like min(5000, d) and got AC.

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

    i did min(3*n, d)

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

      why?? can you explain why calculations after 2*n/3*n will be waste??

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

        Suppose we have:

        A = [N, 1, 2, ..., N-1]
        V = [1] * (2N-5) + [N]
        

        Then after (2N-5) + 1 operation (1), we have:

        A = [3N-4, 2, 3, ..., N]
        

        where 3N-4 = N + (2N-5) + 1.

        Apply operation (2) to score N-1 in (2N-4) + 1 = 2*(N-2) + 1 < 2*(N-1) which beats the alternating method from the zero array.

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

          This seems much like a case specific example. How can you guarantee that the claim is true for any A and V ?

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

            All the calculations from an initial array A only result in a single scoring operation before it gets reset to zero.

            As stated in the comment below, the largest score we can get from a single scoring operation is N — assuming every element satisfies the criterion.

            Calculations taking strictly more than 2N moves are not better than scoring immediately (ie. transition to zero array; if needed) and then alternating operations 1 and 2, scoring N.

            I produced the earlier example to show that in some case, we cannot perform much fewer than 2N moves either.

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

              Oh, I get it now. Thank you so much.

              UPD: I would like to explain mathematically (that's how I like to go about it). Let's say you have done operation 1 for the first $$$X$$$ days, and for the rest $$$(D-X)$$$ days, you'll perform both operations alternately. So your total score would be $$$S + (D-X)/2$$$ where S is atmost N. If you had performed alternating operations from the start, you would have scored $$$D/2$$$. Now, my prior answer is better only if:

              $$$\frac{D}{2} \lt S + \frac{D-X}{2}$$$
              $$$\Rightarrow X \lt 2*S$$$

              Hence, you will get the most optimal answer in the first 2N days because S could be atmost N.

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

                You can't get $$$d/2$$$ in general case because if you start alternating ops from day 1 you'll get $$$initialScore + (d-1)/2$$$. Proof: 238854323

  • »
    »
    2 years ago, hide # ^ |
    Rev. 4  
    Vote: I like it +12 Vote: I do not like it

    $$$n$$$ is not sufficient. You can raise the answer by $$$1$$$ in $$$2$$$ steps using operation 2 but operation 1 can add upto $$$n$$$, so you need to check for the first $$$2 \cdot n$$$ steps.

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

    I can proof. You actually need to do not 5000, but 4001 (additions). Because if you do 4002 additions and get 2000 score as return, you could have also done 4001 for 2000 score with the strategy — do one addition — cash the score

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

    It don't know understand why you need to do that , main thing is that only 1 such position is possible after 0-array , so brute force till k , then all will give 1

    for(ll i = 0; i < k ; i++){
         ll cnt = 0;
         for(ll i = 0; i < n; i++){
           if(a[i] == (i+1)) cnt++;
         }
         ans = maxm(ans,cnt+((d-i-1)/2));
         for(ll j = 0 ; j < v[i] ; j++){
              a[j] += 1;
         }
      }
    
»
2 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

I tried to solve B using DP, but got Memory Limit Exceeded at test-case 3, anybody else tried it using recursive DP, or DP?

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

    I tried that too I reversed the array and used a stack dp but when I calculated the space complexity I was kinda convinced it would give me MLE so I tried a different approach

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

how to solve 'B'!!!

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

what happens if you submit right answer twice for pre tests?

i submitted D twice to avoid tle later.

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

Can anyone check why my code for C is wrong? I have been staring at it for 1+ hour and couldn't find the problem.

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

C is greedy af

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

I have skill issue.

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

The problem set is crazy :)

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

D always getting wrong answer on pretest 5, what a sad Christmas Eve :(
BTW, could anyone please tell me what's wrong with my code 238736754 ?

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

    Oh I see, forget to take those power of 2 exceeding ±20 into consideration ...

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

Not putting N = 2, K = 2 in the samples of E is cold-hearted lol :P

Also imagine debugging WA on E for 15 mins after "handling" this case just to make this fix and get AC ._.

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

Couldn't solve $$$C$$$. How to learn to notice all, what needs to be noticed?

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

    You don't need to do so. Its just that after you do a reset operation then you can't get score greater than 1 after any number of operations. So its optimal to take a score of one from first element greedily after doing 1 reset operation

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

    How many can you get from first reset op?

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

    Here is my solution by the way, which didn't passed probably because of bug in implementation.

    Fix an element in array $$$a$$$. I want to know, when it is good, i.e. $$$a[i] = i$$$. If $$$a[i] \lt i$$$, then after some movements on array $$$v$$$ it will become good, then it will become bad forever. Sounds like scanline. Let's calculate for all elements of $$$a$$$ the segment of numbers of operations of type 1 after which the element is good. Process them in decreasing order. Fix $$$i$$$. Then all $$$v[j] \ge i$$$ change element $$$a[i]$$$. I want to know the position in cyclic array $$$v$$$, after which $$$a[i] = i$$$, i.e. I want to know $$$(i-a[i])$$$-th element of array $$$v$$$ with only elements which $$$v[j] \ge i$$$. Assume, they are in some structure. Let there are $$$x$$$ satisfying elements in array $$$v$$$. Then I need to traverse the whole array some number of times, and them some prefix. So I need to be able to find $$$k$$$-th element. I can do it with Cartesian Tree (Декартово Дерево), or with "indexed set" (google "cses.fi Josephus Problem II").

»
2 years ago, hide # |
 
Vote: I like it -17 Vote: I do not like it

div1 difficulty

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

Can someone pls explain an approach for C?

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

    My English is not good,in my opinion,the sequence is like stairs,because it can be added to ans when it equals to it position,so every time you do opreation [1,b[i]] +1,it will break the stairs,so if 1-n is 0,only 1 or 0 can be added to your ans after several +1 opreation. To be the best,you can do opration 1 once and do opration 2 once.In this way you can add 1 to ans for two oprations. after understand it,you can make a brute force on array 'a' to Calculate the best ans. it will be allowed on O(n*n) , you can according to my ans 238725053. I Hope i can help you.

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

Thank you for spoiling the mood for the new year :(

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

Codeforces ------- NO
Speedforces ---- YES

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

why we need to check 2*n instead of n in C?

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

    really? how do you know

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

    Yes because if it doesn't get give better result in this range there's no way it will give better if it's more since you can increase the score by 1 in 2 steps. I didn't realise that and checked way more than this by throwing and got Ac

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

    Here is a case where checking up to $$$n$$$ fails:

    1
    4 3 6
    2 0 1 2 
    1 4 1
    

    Only optimal solution is doing op 1 five times then op 2.

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

      After doing op1 5 times the array is [7 2 3 4] and doing op2 => answer is 1

      But that is not the optimal solution

      [2 0 1 2]

      op2 => answer = 0 [0 0 0 0]

      op1 => [1 1 1 1]

      op2 => answer = 1 [0 0 0 0]

      op1 => [1 1 1 1]

      op2 => answer = 2 [0 0 0 0]

      op1 => [1 1 1 1]

      Answer is 2

      Did I understood this right?

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

        Doing op2 on array [7 2 3 4] gives 3.

        Op2 counts the number of indices $$$i$$$ where $$$a_i = i$$$, in this case 2 3 4.

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

    more like max(n,k)

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

optimizing knacksap with bitset is uninteresting

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

I think div2 B should be easier or I'm not participate enough

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

Please explain why tourist's solution to problem C 238680690 passed the time limit. I think the condition in the for loop is doing the optimization, but I do not understand why.

for (int u = 0; u < d; u++) {
   if (n + (d - 1 - u) / 2 <= ans) {
     break;
   }
   ...
}
  • »
    »
    2 years ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    d can be upto 1e9 which goes way above the constraint

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

    If n + (d - 1 - u) / 2 <= ans then this and the future iterations are useless since they won't improve the answer. And since the initial ans is $$$\frac{d - 1}{2}$$$, any value of $$$u \ge 2n$$$ will be useless. Therefore, this cycle performs at most $$$2n + 1 = \mathcal O(n)$$$ iterations.

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

noting to say, but good night

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

min(n, k) gave wrong ans so i submited it with k i forget about k = 1e5 after wrong ans test 3 now waiting for fst :( now +60 will turn int0 -60

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

    You don't get FST because $$$k$$$ is large, you get FST because checking the first $$$k$$$ days is not enough.

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

      bro why is there no pretest regarding this. btw thanks for yesterday's contest problems were really interesting even though i didn't get them during contest but i enjoyed during upsolving them

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

E: You are given an even integer n and an integer k

I missed the "even", I would have been able to solve it if I noticed that. Now I think I have a working solution for the odd n. Could have been a nice E1 and E2 problem.

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

    Yes, I didn't think a lot about odd $$$n$$$, but yes it's solvable (check Bonus in the editorial for the problem E)

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

    Ohh What fresh hell is this !!

    Really feels bad when you misread the problem.

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

This contest was OVERKILL for me :(

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

Why did my solution to C pass? I don't understand why it works.

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

C became a scam

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

Can anyone tell me what's wrong with my code for task C? I have WA2 and O(n * log^2 k) asymptotics. 238736328

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

You guys were solving B with a set?

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

Why so many solutions fsted on C?

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

    They simulate the process from $$$1$$$ to $$$k $$$

    However we should simulate from $$$1$$$ to $$$2n+1$$$

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

      Can you explain why $$$2n + 1$$$?

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

        If we do $$$x$$$ updates before getting the score $$$c$$$ in the $$$x+1$$$th step , the total score is $$$c$$$

        But if we perform the operations normally (for a 0-array) the contribution will be $$$ \lfloor\frac{x}{2}\rfloor$$$

        Than it is optimal to make updates in which $$$n\geq c\geq \lfloor\frac{x}{2}\rfloor$$$

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

      Is it because I would have gained $$$n$$$ points in $$$2n$$$ days if the array were reset to 0. The maximum I can gain from an array is $$$n$$$ points and doing it beyond $$$2n$$$ days is wasteful.

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

    min(2n,d) may be greater than k.

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

I love this round.

I love the super-weak pretest in C, which make me fst.

I love the interesting problems C and D, which made me stuck in implementation and debugging.

I love the random constructive problems taking the place of E and F, which makes the diffculty distribution so unbalanced and weird.

Oh. How I love it.

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

Thank you for the weak test cases for problem C.

Now I can reach Expert with the help of FSTs.

By the way, thank you for the awesome round!

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

I wasted 15 minutes because I put n instead of 2n as the limit of days to use second op in C, but least my n log²n D didn't TLE'd and I'll need to use magic to become purple again :)

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

my color changed twice in 2 contest :D

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

Not inserting a test into the pretests for one of the most possible error patterns in C is a bad Christmas gift.

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

c

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

A to C was fine. but D was too much

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

actually 2n days will give n points so if we waste 2n days then automatically we will get the max value i.e. n so if we are acquring n points after 2n days it is a waste its better that we just do the second operation then

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

Merry Christmas everyone!

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

Thanks for round! Tasks were really cool.

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

Beautiful problem F! Thanks!

»
2 years ago, hide # |
Rev. 6  
Vote: I like it +8 Vote: I do not like it
I have a different solution for D than the intended one :p, and doesn't use the fact that p is a permutation

Here is my code : 238726631

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

In Problem C: Checking over the v sequence only once was enough to pass pretest. At least this major corner case should have been included in pretest which is in test no. 26 :(

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

test 26 of problem C is like the grinch :(

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

I liked Problem E very much, thanks _LeMur_! I upsolved it. My idea with 6 was following: if k is small, then print the diamond of 6 ones on the first 3 lines of matrix, then fill squares of 2x2 on the following lines. And symmetrically opposite: if k is large, then subtract k = n*n - k, and do the same with inverted bytes.

Somehow my Perl code is running notably fast. Submission — 238764454.

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

    Problem E-bonus (n can be odd):

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

C is really good but i didnt solve it during the match TwT

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

Guys,my rating for recent educational round was taken back.Is there anyone who is having the same problem?