FelixArg's blog

By FelixArg, history, 14 months ago, translation, In English

Neapolis University Pafos

Hello Codeforces!

The series of Educational Rounds continues thanks to the support of the Neapolis University Pafos.

On Apr/03/2025 17:35 (Moscow time) Educational Codeforces Round 177 (Rated for Div. 2) will start.

This round will be rated for the participants with rating lower than 2100. It will be held on extended ICPC rules. The penalty for each incorrect submission until the submission with a full solution is 10 minutes. After the end of the contest, you will have 12 hours to hack any solution you want. You will have access to copy any solution and test it locally.

You will be given 6 problems and 2 hours to solve them.

The round is based on the problems from the Open Championship of Karelia in competitive programming.

The problems were invented and prepared by Galina Galina_Basalova Basalova, Valentin Valentin_E Ermishin, Lev robotolev Provotorin and me.

I would like to thank the authors of the championship problems whose tasks were not included in the final set for the round: Ruslan r314 Alkin, Yuriy basalov_yurij Basalov, Alexey ashmelev Shmelev, and Nikolay Nicola95 Ermolin.

I would also like to express my sincere thanks to the round coordinators: Ivan BledDest Androsov and Mikhail awoo Piklyaev for improving the quality of the problems and helping with their preparation.

Big thanks to our testers: Brovko, deni1000, KIRIJIJI, shnirelman, Alenochka, slash0t, LightSky, infinite_meltdown, Knh_era, M1chail, Antithesis, Kolychestiy, neohacker for their valuable advice and suggestions!

And of course, huge thanks to Mike MikeMirzayanov Mirzayanov for great systems Polygon and Codeforces.

Good luck to all the participants!

Our friends at Neapolis University Pafos also have a message for you:

Admission to the Computer Science and Artificial Intelligence bachelor's program at Neapolis University Pafos is open!

The JetBrains Foundation supports this bachelor's program and offers 20 fully funded scholarships for talented first-year students. They initially announced 15 scholarships but have now increased the number to 20 to give more students the opportunity to join the program.

Each scholarship covers entire duration of the program, including tuition, accomodation, medical insurance, visa fees, and €300/month pocket money.

They are also offering now 2 fully funded scholarships for students transferring into the second year of the program.

Learn more here →

First admission round:

  • Application deadline – April 23, 2025
  • Entrance test – April 27, 2025

UPD: Editorial is out

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

| Write comment?
»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Can anyone say me the difference between educational rounds and normal rounds?

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

    Edu rounds:

    • Problems are meant for educational, so the technique is pretty much can be found in textbooks or similar problems in the past.
    • The standings/scoring/penalty will be a little bit different from normal rounds.
    • The difficulty of Edu round usually have the same range as normal Div. 2.
  • »
    »
    14 months ago, hide # ^ |
    Rev. 4  
    Vote: I like it +6 Vote: I do not like it

    Including minuki's points biggest difference is that there is a 12 hour open hacking phase.

    During this time, you/someone else can attempt to create new, valid test cases that adhere to the problem's logic and constraints, but they can only target and test the code of one other specific participant at a time.

    If a submitted solution fails on one of these newly created test cases (resulting in Time Limit Exceeded or incorrect output), the creator of the successful hack earns points (i think its +100 or something). (UPD: INCORRECT DOESNT HAPPEN)

    After the 12 hour hacking phase, these newly generated test cases are incorporated into the final system testing to identify any other solutions that fail under these conditions.

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

    why rating updation is delayed?

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

      The system test is about to start, and the rating will be updated after it is completed.

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

For most people: classic questions and tricks For me: never seen them before and have no idea about them

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

new writers of Educational Codeforces Round!

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

I hope it goes well.

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

New Era in Edu rounds??

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

non-BledDest edu round?? surprised

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

As a tester, FelixArg [orz] * INF

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

Galina_Basalova why you are newbie

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

I must go to bed before 11:35 pm(UTF+8), should I participate this round?

UPD: I just found that I can participate this round in UNR mode :)

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

When the contest is 45 minutes long:

pE63Ixg.png

It seems very wonderful. Cheaters everywhere.

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

    I'm assuming they are all cheaters, since they probably don't have to ability to solve C in 3 minutes or solve E in 9 minutes (unless your like a LGM, but they aren't, so...)

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

    The person in spot #1 literally registered right before the contest... unbelievable

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

    I have been on Codeforces few weeks ago. Every time I looked at the scoreboard, I felt like I was intellectually disabled...

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

    I mean the problems don't feel that hard to me. I'm currently upsolving and was able to do solve A-D in ~25 minutes (then get stuck on E). I don't mean it in the way that there's no cheaters, but the first 4 questions aren't that hard to decide.

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

guys i have a problem i can think and solve in my brain problems till 1700 but when it comes to implementing i suffer from lots of bugs i code c++ can somoene help me with this i need to pass newbie phase

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

    Maybe you can turn on Warning All mode.And I write down the bugs I have made and classify them,including bugs on problems understanding and on details.Maybe this will work

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

How to solve E?

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

      damn im dumb

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

      Yeah but how to do it?

      Like how do u know the actual value of k while constructing your number in digit dp?

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

        There will be 30 numbers less than 1e18 which are zebra-like,with a[i]=4*a[i-1]+1. To calculate zebra-value of a number n,iterate from highest to lowest ZL number and if current ZL is higher than number add n/ZL to answer and update n to n%ZL(this is simple greedy).

        Since a[i]=4*a[i-1]+1 for ZL,we can add at max 4 for each ZL,but if we add 4 for a ZL[i] then n becomes 0(n must be less than next ZL[i+1] which is 4*ZL[i]+1 ),so we can add 4 only once,hence max k is 3*30 + 1.

        So,to find count of numbers less than equal to a integer n with zebra value k,calculate contribution of each ZL in zebra value of n ,now iterate backwards from highest ZL to lowest ZL and this is it.

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

    dp digit, although I couldn't do it on time. We can iterate from lower to higher bit, and for each bit in the even position, we try to iterate the number of 1 which will be add in that position. Notice that the number of 1 won't be increase, so we need to store the upper bound of this number each time we iterate.

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

Solved a Digit DP problem for the first time in a live contest, the only issue with the round is difference between (D-E) and (E-F) is too much.

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

    which is Digit DP ? D? if so whats the intution

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

      E is digit dp,D is knapsack.

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

      Get sum of all ci's. now get k which is ceil(sum/2), form subseqeunces of array(remove all the zeros for better understanding) which give the sum as k. for this collections of characters the number of permutation would be=(number of elements in the subseqeunce)!*(number of non zero ci's — number of elements in the subseqeunce)!/(product of factorial of all ci's). do the same for each subseqeunce you get and add them up and mod whatever value they gave/

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

        thats what I was doing I had implementation problem due to using mint template

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

        I thought about doing it this way. In the case of all 1s, won't it go through all possible splits of the 26 characters effectively 226 masks since every split is valid for odd/even?

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

b was kind of easy but I wasted time taking x as int and debugging ;(

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

In Problem $$$E$$$, to minimize $$$p$$$ we must write $$$x$$$ in base $$$z$$$ right?

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

Was C that easy or am I dumb?

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

    its observation and i'm sure most of them used gpt as it's very classical one for GPT.

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

    Permutation cycle and its length is already very old idea. I'll point out just 1 problem for example that use the same idea and have almost the same people solved. (This was Div. 3 from 5 months ago)

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

    I learned various ideas associated to permutations thanks to a great blog written by nor, although they deleted all of their blogs on codeforces a couple of months ago. Luckily, I've found their original blogs hosted on this website:

    one of the best introductions to permutations

    So, in essence: yes, problem C was relatively straightforward if you knew the theory + saw an observation or two, although those observations would be easier to find if you knew the theory beforehand...

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

How to NOT TLE in D? I use memorization + recursive (calculate f(odd_remain, even_remain, current_index))

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

I had right mindset in D but i dont why answer was some random no always I hate this MOD kind of questions

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

    bro got the right mindset is already a bless, after contest I do see people instantly solve D by dp since it's classical... except me because I'm still suck at dp badly.

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

misread B,and wasted 1 hour,btw all questions that I read(A-D) were nice.Thanks for the contest

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

People who solved F please explain the key logic, coz I'm missing something and its itching my brain.

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

Can someone tell what's wrong in my approach for problem B?

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

    what are u even trying to do here? and why are you taking MOD ?

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

    you were 99% correct except the floor part should have taken ceil and use this formula

    want_sum=x-rem_sum
    how_many=ceil(want_sum/tot)+1
    if how_many<=k:
       ans+=k-how_many+1
    
    
    • »
      »
      »
      14 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      it will basically tell no of subarray of size how_many in an array of size k.

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

        but why is bro using MOD in B

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

          Just to be safe with large numbers,bcz i thought that may be the reason of my WA

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

            never use MOD when not specified , large number can also be answer to this problem use long long for that

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

              Just for clarification: in some cases you may use modular arithmetics even if it wasn't specified in a problem, but only if you know that the answer will not change. For example, I have solved one problem, where I calculated answer combinatorially using mod 1e9+7 using an observation that the real answer will always be in range [-2;2].

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

editorial when?

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

How to solve D?

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

    Decide , which characters you want to place at even positions (or odd positions) , then the sum of $$$c[x]$$$ corresponding to them must be equal to number of even positions. So just find those ways using knapsack.

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

    Every letter must be all placed in either odd or even place.Then we can DP,the state is the count of letters placed in odd and even places.Let n be the total count of letters,this is O(n^2)

    But if we know the count of odd places,the count of even places can also be known.So the time can be O(26n)

    The transfer is to place all same letters in either odd or even places,this can be calculated by Combination Number in O(1) if we have preprocessed.

    My code

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

someone explain B please

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

Hint for D please.

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

    Get sum of all ci's. now get k which is ceil(sum/2), form subseqeunces of array(remove all the zeros for better understanding) which give the sum as k. for this collections of characters the number of permutation would be=(number of elements in the subseqeunce)!*(number of non zero ci's — number of elements in the subseqeunce)!/(product of factorial of all ci's). do the same for each subseqeunce you get and add them up and mod whatever value they gave. you would need to use dp to get these subseqeunces

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

      although I haven't read your comment but I just wanted to tell that Hint != solution in any dictionary

      • »
        »
        »
        »
        14 months ago, hide # ^ |
         
        Vote: I like it +2 Vote: I do not like it
        Hint 1
        Hint 2
        Hint 3
  • »
    »
    13 months ago, hide # ^ |
     
    Vote: I like it 0 Vote: I do not like it

    Every letter must be all placed in either odd or even place.Then we can DP,the state is the count of letters placed in odd and even places.Let n be the total count of letters,this is O(n^2)

    But if we know the count of odd places,the count of even places can also be known.So the time can be O(26n)

    The transfer is to place all same letters in either odd or even places,this can be calculated by Combination Number in O(1) if we have preprocessed.

    My code

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

How to solve d ?? can anyone give the hint

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

    You need to calculate how many permutaions you can to do when you fixed %2 for ever character. And then you can calculate how may combinations of %2 for ever character have (DP). Check my code, if you don`t understand me.

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

    For any valid distrbution of char (ex: 'a' in odd postion, 'b' in even position, ...), the number of sequence are the same.

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

      • Each letter must be placed entirely in even or odd indices.
    • Total Positions:

      • Let n = sum(c[i]) be the total string length. assume 0 indexed string.
      • Define E = ceil(n/2) (even positions) and O = floor(n/2) (odd positions).
    • Subset Sum Condition:

      • We must choose a subset of letter counts summing to E (remaining letters go to O).
      • Use dynamic programming (DP) to count valid selections.
    • Once an assignment is fixed:

      • The even positions can be filled in: $$$\frac{E!}{\prod_{i \in \text{even}} c[i]!}$$$
      • The odd positions can be filled in: $$$\frac{O!}{\prod_{i \in \text{odd}} c[i]!}$$$
      • Combined, the total permutations for any valid assignment are: $$$\frac{E! \times O!}{\prod_{i=0}^{25} c[i]!}$$$
    • Since this value is independent of specific assignment:

      • we multiply it by the DP count X (number of valid ways to distribute letters).
    • Final Answer $$$= X \cdot \frac{E! \times O!}{\prod_{i=0}^{25} c[i]!}\mod998244353$$$

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

    Every letter must be all placed in either odd or even place.Then we can DP,the state is the count of letters placed in odd and even places.Let n be the total count of letters,this is O(n^2)

    But if we know the count of odd places,the count of even places can also be known.So the time can be O(26n)

    The transfer is to place all same letters in either odd or even places,this can be calculated by Combination Number in O(1) if we have preprocessed.

    My code

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

I think it is good problems. But i think, task D is very easy for his place. And I can`t understand, why so many people OK C on very low time?

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

So many cheaters again. So sad this is the closest shot I got at becoming master and I am probably going to lose it because of cheating :(

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

For problem D, I was going with an approach which needed me to apply subset sum algorithm.

I went with recursive memoization approach and this is its code https://mirror.codeforces.com/contest/2086/submission/313827623

The below is the iterative dp approach for it https://mirror.codeforces.com/contest/2086/submission/313827274

The problem is that recursive method gave a TLE at testcase-2 whereas iterative approach passed all the cases. I always prefer writing dp in recursive method since I find it comfortable and have never faced this issue in any other contest.

Anyone has any idea on whats going on?

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

Number 1 in Div.2 (jack_l_b_b) is using AI right? Compilation error in A, then submit a code like this for A:

long long n;
cin >> n;
long long berries_needed = 2 * n;
cout << berries_needed << "\n";

I mean, to print 2 * n like this, and solve it in 6 minutes, I bearly think that his rating would be >1500. After that, this user spends only 5-9 minutes on B to E, with over 100 lines of code for submissions for D and E. Also, the format looks like GPT-written with comments washed out only, and the variables are too long for a human to use.

P/s: I just posted this in a post, but it is removed. The problem of today's round is great, especially F amazing task which I'm so looking forward to reading the editorial. It's just that it is really possible to use AI and get 1st place...

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

    He's not using AI, There was a blog about a telegram group with around 800 members.

    I was checking the group messages, and his codes are very similar to the codes that were sent in that group.

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

    Imagine naming variables with less than 8 characters like you actually worked for that code...

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

This was my first contest, I was able to do A and B and like almost C. Overall I think I did pretty well, but then how are 7k people solving the third one? do people cheat in the contest here? also when will I get my first rating?

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

    Today's c was comparatively easy.it's around 1300 rated problem.it may take 15-16 hours to get your first rating

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

      Well, rating depends on number of people who solved that problem, so you can't use it to prove there wasn't mass cheating. But C was not harder than usual.

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

There's even a Youtube channel that live solved the problems during the contest !!

Link : https://www.youtube.com/live/4_z0spfV_pM?si=LuEVWNSrDAozlBk9

How shameful!!

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

niggawhat

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

damn it! I finally got fucked up by memset, I mean D.

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

For D, if I use ll dp[sum+1][27], it gives me SIGSEGV in my vs code(seg fault) but when I use vector<vector > dp(sum + 1, vector(27, 0)), it passes, any proper reasoning to it, as the max value of sum is given to be <= 5e5, unable to get the reasoning behind it. Please help.

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

Isn't problem A ridiculously easy even for a Div 2 A problem?

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

I noticed that some of the cheaters got live removed, however, there are still a lot of suspicious accounts which should be investigated further, e.g. in the top 5: chenzheyuan, hprwhgsafwan12, not.found

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

Cool man found! I think StarSink cheated.

StarSink's code in B C D E has tons of annotation. WOW! Even more than the codes?

And you can see the solving time is random and funny: 01:30 01:51 01:26 01:25 01:49.

D used 1:25? That doesn't matter, maybe he forgot the contest?

Why C only 1 minute?

Then Finally A?

A used 5 minutes?

Then, E??? Why not B?

B in 2 minuets???

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

How is D implemented? I think i have the idea.

  1. |i-j|%2 = 0 => all occurrences of a character should be stored either in odd/even position
  2. Now ways to arrange them is : number of ways to chose x1, x2, .. xn such that f[x1] + f[x2] .. f[xn] = n/2 where x1, x2.. are characters and f[xi] represents their frequency. and number of permutations for each one is (n/2)!/x1!*x2!...xn!.. The ans is 0 if no such combination exists. Use knapsack. The issue is: I have no idea how to implement this efficiently. Can you guys help?
»
14 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

For problem D, an ungraceful solution is just dp without using combination of multisets, set f[i][j][0/1] as the number of ways to fill, now is the i character, has filled j chars in odd positions, now char filled to odd/even position, we can use prefix_sum to calculate numder of filled even position as every char must be filled, then use C(remain position, c[i]) to multipy previous number of ways. https://mirror.codeforces.com/contest/2086/submission/313862304

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

Problem D was educational, sure, and that's the reason it was easily solved by AI.

It's sad to know that cheaters might have gotten through this problem like this anyway.

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

Does this round become unrated? (my screenshot)

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

    no they just haven't updated ratings yet...

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

      Thank for pointing that out! Can you tell me when to expect the rating changed ? Because to be honest this round has completed it's hacking phase in like 4 hours prior to my previous comment.

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

When Editorial?

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

2086E - Zebra-like Numbers depends on the observation that

Spoiler

Is there a simple proof of this property?

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

      Thanks! I think that works, though not quite as simple as I'd hoped. Pretty tough problem for an educational round!

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

For problem D, my solution was as follows:

First, since the indices need to be a distance apart that is equivalent to 0 mod 2. We can split the indices into red and black squares, like a chessboard.

For each valid partition, there will be a black group and a red group, and the sum of the black group will need to be ceil(n/2) and the sum of the red group will need to be floor(n/2) where n represents the total length of the string

Each valid partition can then make up multiple valid orders. The amount of valid orders of each valid partition is the product of the multinomial coefficients of both groups.

To find the valid partitions you can use iterative dp or recursion with backtracking. I used the recursive method since it was more intuitive.

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

The developers of the round are the best!

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

Why is the round still unrated for some people?

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

Yeah.I solved 5 problems in this contest and get purple now ^_^

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

i received a warning, for my solution coinciding with solutions with A LOT of users, i do not know why others have similar solution as me, it said to comment on this post to appeal i guess? the only proof i wouldve had were my failed attempts on vs code, but this was weeks ago so i cant access that-

but like if i am to explain my approach and code,

i basically tracked the group elements which resulted in loop/cycle and separated them

cyclecount was basically index of the loop, so tell that this element was in this loop, and i kept track of the loop length, and then basically add lengths of all separate groups.

if theres anything else i need to clarify lmk