BledDest's blog

By BledDest, 4 months ago, In English

Neapolis University Pafos

Hello Codeforces!

The series of Educational Rounds continues thanks to the support of the Computer Science and Artificial Intelligence (CSAI) program at Neapolis University Pafos, with scholarships provided by JetBrains.

Educational Codeforces Round 190 (Rated for Div. 2) will start on May/18/2026 17:35 (Moscow time).

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.

The problems in this round will partially intersect with Saratov SU internal contest (scheduled for 17th of May), so if you are a student of Saratov SU who participates in it, you have to skip this round.

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

The problems were invented and prepared by Adilbek adedalic Dalabaev, Maksim Neon Mescheryakov, Alex fcspartakm Frolov and me. Also, huge thanks to Mike MikeMirzayanov Mirzayanov for great systems Polygon and Codeforces.

Big shoutout to testers of the round: shnirelman, awoo and FelixArg! Thank you for testing the problems.

Last but not least our friends at Neapolis University Pafos also have a message for you:

The final admission round for the BSc in Computer Science and Artificial Intelligence at Neapolis University Pafos is now open.

Key Dates:

  • Application deadline: June 9, 2026

  • Mandatory Entrance Test: June 14, 2026

Apply for a chance to receive one of up to 40 JetBrains Foundation Scholarships covering:

  • full tuition

  • accommodation

  • monthly stipend

  • visa support

Start your application and prepare before the final deadline!

Good luck to all the participants! I hope you will find our problems both interesting and educational.

UPD: The editorial can be found here.

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

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

I love you guys

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

Love it!

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

And here we go, $$$6 - 7$$$ problems again...

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

i am lazy

»
4 months ago, hide # |
 
Vote: I like it -29 Vote: I do not like it

不错不错

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

hi

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

Div4 and educational rounds are the rounds we like the most.

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

Hope For Interactive Problems

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

    If the round announcement doesn't specifically say there will be interactive problems then there won't be interactive problems

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

?

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

I bet the hacking phase will be awesome!

Spoiler

GL & HF!

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

Lesssss gooooooooo Educational Round here we go

Must be the water aaaaah Moment

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

hope this contest will be better than previous one:)

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

Educational rounds never disappoint. Time to solve A–B confidently and get humbled by C.

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

Hope this gets me expert

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

Interesting round, except for the fact that I will lose nearly 50 ratings after this round ;). Meanwhile, my friend is going to reach CM...

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

$$$D$$$ was so easy, had no time to solve it.

If only I hadn't gotten stuck on trash can problem $$$C$$$.

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

what's the intended solution for D, am i stupid for using a nlogn solution?

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

    i have O(n) DP-like solution, working from right to left

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

    Its simple DP. You have to compute a helper DP at indices where $$$a_i = b_i$$$, like if you both had watched that episode at that index then how much further segments they can still watch before you find a bad pair. And then use this DP later for smaller $$$i$$$. Sorry if explanation is bad but hope you get the idea.

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

    At each index $$$i$$$, let $$$dp_j$$$ be the number of subarrays ending at index $$$i$$$ in which we've already watched $$$j$$$ movies ($$$j$$$ can be 0). Based on $$$a_i$$$ and $$$b_i$$$, we only need to update a few elements in the $$$dp$$$ array for the current $$$i$$$, and then we add all values from $$$dp_j$$$ to the answer. This can be done efficiently by keeping track of the sum of $$$dp$$$ at each point in time, making it $$$O(1)$$$ for each $$$i$$$ and $$$O(n)$$$ overall.

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

    I think the easy way to think about this is that each $$$(i, i)$$$ determines what we are interested in next in $$$(i+1,i+1)$$$, $$$(i+1, x)$$$ or $$$(x,i+1)$$$. This creates a single outcoming edge. Having this sort of tree structure, you can just DP on it to know where the chain ends if you start in some $$$(1, 1)$$$.

    375107486

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

    Backwards DP. Let dp[k] be max day that Alice and Bob can reach if they enter the current day with k episodes watched so far. For each day i, if a_i = b_i (say =k) then the max day they can reach from state k-1 is the same to max day they can reach from state k, so dp[k-1] = dp[k]. Otherwise, they cannot even progress past the previous day, so dp[a[i]-1] = dp[b[i]-1] = i.

    Answer is sum of dp[0] — i for each i. Time complexity is O(n) for each test case.

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

    You can keep track of valid left points for every point i by storing their mex value if they survive till point i. When entering a position you can create a new starting position. If a[i] != b[i], all left points whose mex value are a[i] or b[i] dies at this point, so you just need to add all left points that are alive at every index i.

    375130209

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

i m so ashamed of india's coders bro . they just wont stop cheating man. I hate my countrymen for this.

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

I got humbled bad man...

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

Had no time to solve E :p

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

.

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

    why so overkill?

    notice that for a given person, we have 5 cases: (1) the optimal p is 0, and optimal c is 0, (2) optimal p is t+d, optimal c is 0, (3) optimal p is 0, optimal c is t+d, (4) optimal p and c are both t+d (5) the optimal uses the raw value of p+c

    what can be done is to sort the values c[i] by the key p[i], and vice versa, then build suffix and prefix minimums on them. this allows us to efficiently query the first 4 cases, by asking for example "what's the minimal p-value amongst all i such that c[i] >= t + d?". you find by binary search the location of first c[i] where c[i] >= t+d, then use the suffix minimum to answer the query.

    for the final case, we can just store a segment tree on the values of p+c, sorted by p[i]. then make a query in the range [t, t+d] for the minimum. why does this work, even though the minimum might use a c > t_c? it works because our other 4 cases will have caught that, so even though p+c ≠ I(p,c), it doesn't affect the answer as it is larger than the actual value and we are taking mins

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

      this account is a cheater(AI) account that doesn't know what he's talking about

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

      Am I wrong or it can be solved just considering following cases:

      1) p is 0,take minimum such c by binary search 2) c is 0,take minimum such p by binary search 3) p+c is minimum over all the array 4) p is minimum over all the array 5) c is minimum over all the array

      It passed the tests

    • »
      »
      »
      4 months ago, hide # ^ |
      Rev. 3  
      Vote: I like it -39 Vote: I do not like it

      .

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

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

In Education round I got educated in problem D

I was trying to write some dp with two kind of DP, while storing next values' index coming from right to left

  • solution if we start here and we watch an episode on this day,

  • solution if we start here and we don't watch an episode here

but got confused in implementing it, I was writing too many if-else

is there a simpler way to code this, or some other ideas ?

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

    Get a dp array at each i where a[i] == b[i] which means the right bound if we have already watched 1..=a[i] movies. The transition would involve cases like the next a[i]+1 in both a and b having the same index or not.

    Then for each starting L, find the next position of 1 in both a and b, if they are the same index, ans += dp[ix] — i, else ans += min(ix_a, ix_b) — i.

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

      thanks, I was writing same and was sure it is correct but I am looking for simpler implementation I guess, because I was not able to simplify it.

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

        Define $$$dp[L]$$$ as the minimum $$$R$$$ such that the subarray $$$A[L \dots R]$$$ is bad.

        The first movie has to be $$$1$$$. Suppose it is present at indices $$$a_1$$$ and $$$b_1$$$. If $$$a_1 \neq b_1$$$, then $$$dp[L] = min(a_1, b_1)$$$.

        Otherwise, $$$dp[L] = dp[a_1]$$$

        How to compute $$$dp[a_1]$$$? Notice that $$$a_1$$$ contains a $$$1$$$, so the first movie that you watch from this point onwards is $$$2$$$, so you locate the next occurrence of $$$2$$$, suppose it is $$$a_2$$$ and $$$b_2$$$. If $$$a_2 \neq b_2$$$, $$$dp[a_1] = min(a_2, b_2)$$$

        Otherwise, $$$dp[a_1] = dp[a_2]$$$

        Submission

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

Can anyone Tell me why it got TLE 375137614 Why O(nlogn) got tle

I was happy until "running on test 15".

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

    If I understood your code correctly, it will TLE in an input of this form:

    n
    [1 1 1 1 1 .. (n/2) times] [2 3 4 5 ... (n/2)+1]
    [1 1 1 1 1 .. (n/2) times] [2 3 4 5 ... (n/2)+1]
    

    Since for each 1 you are going to the next largest integer, this code will take $$$O(n^2 \cdot \log n)$$$ time (for each 1, you are traversing the $$$\frac{n}{2}$$$ list of numbers from $$$2 .. n/2 +1$$$)

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

      I think a tighter bound can be proven (O(n^2)). because for every possible left end point (Say L).we are doing binary search to find first 1 at index >= L (say it's i1) now we will do binary search to find first 2 at index >= i1 and so on. Now the amount of times we will do binary search is O(n) but the runtime of every binary search is O(log f[i])(where f[i] is the number of times element i occurs in the array) so the total runtime of all binary searches for a given left end point would be upper bounded by (sum of log(f[i])) over all i (because we never binary search for the same element again given the left endpoint is fixed) which is log(sum of f[i]) which is O(log n) . So for a given left end point overall runtime is O(n + log n) which would be O(n^2 + n log n) or O(n^2) overall.Reply if anything seems wrong.

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

        I don't quite get how you arrived at $$$\sum_i \log f[i] = \log (\sum_i f[i])$$$. A better argument would be to use the concavity of log function to arrive at

        $$$ \frac{\sum \log f[i]}{n_d} \leq \log (\frac{\sum f[i]}{n_d}) \leq \log(\sum f[i])) $$$

        where $$$n_d$$$ is the number of distinct elements. The last inequality is possible because of the monotonic nature of $$$\log(.)$$$

        From this we get that $$$\sum_i \log f[i] \leq n_d \cdot \log (\sum_i f[i]) \leq n_d \cdot \log n \leq n \cdot \log n$$$ (Since number of distinct elements $$$\leq$$$ number of elements)

        Using this inequality we arrive at the same $$$O(n^2 \cdot \log n)$$$.

        Please correct me if I am wrong.

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

          Oh sorry I forgot to change sum to product there. But i also have another question if we only use the inequality u mentioned on the left side. Then sum of log(f[i]) <= n log((sigma f[i])/n) If we substitute sigma f[i] = n here on right right side something weird is happening. Like Sum of Log(f[i]) <= n log(1) (Got it now thanks)

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

            Even if you use product, I think if you use some bounds from AM-GM, you are likely to get the same bound.

            Secondly, I think it is a slight oversight from my side in using the wrong notation. The $$$n$$$ in the expression should be replaced with $$$n_d$$$ where $$$n_d$$$ is the number of distinct elements. However you can bound it in a similar way (not too hard)

            EDIT 2: Made the necessary changes in the original post

            EDIT: The inequality I'm referring to is Jensen's inequality (https://en.wikipedia.org/wiki/Jensen%27s_inequality). The inequality is right; just an error in notation :)

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

      got it , i just have to store (memoize it) it like {next int,index} so next time whenever i reach i directly call the answer

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

    This is my O(nlogn) solution 375186318

    To handle cases like [1 1 1 1 1 .. (n/2) times] [2 3 4 5 ... (n/2)+1]

    Use: if(a[i]==a[i-1])curr_r = previ_r;

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

Can someone explain where I am wrong in B? Remove all 4s+min((count of 1+count of 3 before last 2),(count of 2 after minimum index of 1 and 3))

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

    idk I did the same sol as u and kept screwing up on test case 2

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

    For this test case 1 1 1 2 2 2 2 2 3 3 3 3 2

    • count of 1 + count of 3 before the last 2 = 7
    • count of 2 after the minimum index of 1 and 3 = 6
    • if you remove first first 3 ones and last 2, cost = 4 and you still get a valid ordering.

    Logically speaking, you are only considering 2 strategies: removing ALL ones & threes, or removing ALL twos. You are not considering any hybrid strategies.

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

      I took a slightly different approach and considered the count of 2s remaining after when deciding which path to take 1. remove all the current two 2. remove all the ones + threes before

      for _ in range(int(input())):
          s = list(map(int, input()))
          n = len(s)
          
          removed = s.count(4)
      
          suffix2 = [0] * (n + 1)
          for i in range(n - 1, -1, -1):
              suffix2[i] = suffix2[i + 1] + (1 if s[i] == 2 else 0)
      
          count = 0 # counts 1s and 3s
           
          for i in range(n):
              num = s[i]
      
              if num == 4:
                  continue
      
              elif num in (1, 3):
                  count += 1 # 12 , 32
      
              elif num == 2 and count > 0:
                  if suffix2[i] > count:
                      removed += count
                      count = 0
                  else:
                      removed += 1
      
          print(removed)
      
      • »
        »
        »
        »
        4 months ago, hide # ^ |
        Rev. 2  
        Vote: I like it 0 Vote: I do not like it

        Consider the test case: 1 1 2 1 1 1 1 1 2 2

        In this test case your code will remove the first 2 ones and last 2 twos with a cost of 4. Whereas you could've just removed all 2's.

        I think you are just missing the case when you have to remove all the twos. Another check outside the loop might work.

        EDIT: The additional check doesn't work.

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

          thanks lol; just checked the sol and realized where i went wrong. better approach would've been just to remove all 4s, then look at the string every time there is a three/one to check if its worth keeping the previous chain of 1/3 or the chain of 2s instead (persistent count that is never reset), adding one to account for the 1/3 just read. At the end you add a final check (like u mentioned) for cases where there are no 1/3.

          #B. Digit String
          '''
          for _ in range(int(input())):
              s = list(map(int, input()))
              n = len(s)
              
              removed = s.count(4)
          
              suffix2 = [0] * (n + 1)
              for i in range(n - 1, -1, -1):
                  suffix2[i] = suffix2[i + 1] + (1 if s[i] == 2 else 0)
          
              count = 0 # counts 1s and 3s
               
              for i in range(n):
                  num = s[i]
          
                  if num == 4:
                      continue
          
                  elif num in (1, 3):
                      count += 1 # 12 , 32
          
                  elif num == 2 and count > 0:
                      if suffix2[i] > count:
                          removed += count
                          count = 0
                      else:
                          removed += 1
          
              print(removed)
          '''
          
          for _ in range(int(input())):
              s = list(map(int, input()))
              n = len(s)
          
              # basic idea is first remove all fours, then look for the longest sequence of twos follows by 1/3; not the other way arround as it would break the rule
          
              count = s.count(4)
              seq = []
          
              for i in range(n):
                  if (s[i] != 4):
                      seq.append(s[i])
          
              only2 = 0
          
              best_seq = 0
          
              for i in range(len(seq)):
                  if seq[i] == 2:
                      only2 += 1
                  if seq[i] == 1 or seq[i] == 3:
                      # adds one to simulate adding a 1 or 3 after a chain of twos -- 22221 (which is fine)
                      # checks if the current chain of twos is worth more then the previous chain or twos + threes
                      best_seq = max(only2, best_seq) + 1
          
              best_seq = max(only2, best_seq)
                      
              print(n - best_seq)
          
    • »
      »
      »
      4 months ago, hide # ^ |
       
      Vote: I like it 0 Vote: I do not like it

      Can you explain your logic?

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

        Its obvious that we need to remove all the 4s. Now iterate from left to right and consider we encounter a 1 or 3 at the ith position. We have two choices from here:

        • Suppose I choose to keep this 1 (or 3). Then I will be forced to remove all the 2s to the right of ith position. Once I remove all the 2s, it automatically becomes a valid configuration. The cost for this is $$$\text{count of (1s/3s)} + \text{suffix_count[i]}$$$
        • The other choice is to remove the 1 (or 3). Removing this single occurrence is added to a counter. Immediately removing this character doesn't make it a valid configuration, so we have to continue this process until the end.

        You can come up with a loop invariant to show that for every iteration i, once we remove all the prefix 1s and 3s, removing all the suffix 2s from here is a valid configuration. This is required to justify the expression ans = min(ans, cur + fours + twos[i]);

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

    I used the same idea and got WA2 :(

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

anyone used DP for B or just dump me..

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

B is so hard :/
i didn't see condition where numbers are between 1 and 4, so i solved for 1..9 (

But i really liked problem E, although i did ~200 lines implementation xD

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

thanks for useful samples in C!

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

ABC is easy, D is hard asf.

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

Relatively simple E, just ran out of time smh

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

the worst “B” in ever for me

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

In 375138399, I got a mysterious Compilation Error with error message

g++.exe: fatal error: cannot execute 'C:/Programs/gcc13-64-winlibs/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/as.exe': CreateProcess: No such file or directory

I submitted basically the same code 3 minutes after and got AC: 375139568

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

    I've forwarded this issue to the admins, they are investigating it currently. Your submission will be rejudged

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

375122442 Can any one help get a test case in which this fails? Main idea is to count at each step if I am encountering an 1 or 3, I am checking count of 2 and count of (1 + 3) till that point and adding the minimum to my answer and discarding all counts of 1 , 2 and 3.

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

Can someone see my profile and say how do I practice I am stuck on div2 contests sometimes I do 2 sometimes 3 I want to reach level of 4(mostly) how do I practice I prefer solving codeforces problemset no tags as per choosing rating what do I choose Thankyou:)

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

How to get rid of huge constant in E?

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

Anyone else felt C easier than B?

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

anyone felt D was harder than E?

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

There is a $$$O(n\log n)$$$ solution for D with Fenwick Tree which can be optimized to $$$O(n)$$$.

At each index $$$i$$$, if $$$a[i]==b[i]$$$, it can either extend all valid segments ending at $$$i-1$$$ that have watched until exactly episode $$$a[i]-1$$$, causing both Alice and Bob to now watch episode $$$a[i]$$$, or extend all valid segments ending at $$$i-1$$$ that have watched until some episode other than $$$a[i]-1$$$, but both Alice and Bob do not watch the current episode.

If $$$a[i]\not=b[i]$$$, then any valid segment ending at $$$i-1$$$ that have either watched until exactly $$$a[i]-1$$$ or $$$b[i]-1$$$ cannot extend past $$$i$$$, since only one of them would be watching the episode. All other valid segments can be extended, provided neither $$$a[i]$$$ nor $$$b[i]$$$ are equal to 1.

With a Fenwick tree, we can maintain the number of valid segments ending at $$$i-1$$$, where the next episode to watch is $$$k$$$ for $$$1\leq k\leq n$$$, and update the counts of valid segments using point update, and doing a range sum for $$$[1,n]$$$ for each index. This leads to an $$$O(n\log n)$$$ solution. Submission: 375183000

We can observe it's not necessary to maintain a Fenwick tree. We can just use a $$$count$$$ array. The only change is we now have to keep track of $$$total$$$ — the total number of active, valid segments ending at $$$i$$$. This reduces the complexity to $$$O(n)$$$. Submission: 375184626

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

Who else solves E in $$$O(n+q+V)$$$ ?

»
4 months ago, hide # |
 
Vote: I like it -12 Vote: I do not like it

Hi

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

why always there is an overflow hack and it is not in main tests in edu rounds ?? T__T why even keep 1e9 constraints on values :( just int <--> long long causing bug hurts ::( BledDest

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

3 problem was something difficult to understand

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

Why ten hours for system testing + edi?

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

    i think its long queue thats why.my one solution is in queue but now i paste same solution that is accepted

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

After 35 contests and over 220 days practice I finally reach master again

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

I participated as rated, but this contest is showing in my unrated contests. Plus there is no change in my rating.Why?

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

Weak pretests in E.

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

when will the contest rate us (please forgive my bad english)

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

Hope I will reach expert after this contest!!

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

wheres the editorial ganggg

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

Does anyone know why is it taking so long to update the ratings and why is it showing in unrated contest list in profile -> contest??

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

    till the contest rating changes are not released the contest appears in unrated contests section in the profile, educational rounds take more time for ratings to be released.

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

why long ahh queue or is some testin still going on

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

I solved 2 questions in this round but my rating drops 33 why? I cant get this actually I am new to this can anyone explain why this happens morever I submitted solution in single attempt only

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

    Because you submitted too late, even without wrong submittions the penalty is too high which puts you at rank 9000+, rating change depends on that.

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

I understand the concern regarding similarity. I solved the problem independently during the contest using the standard two-pointer approach commonly used for this type of problem. I did not intentionally copy any solution. I will also make sure to use a more distinct coding style/template in future contests. Thank you.

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

Respected Team members,

As my solution was found similar to some other contestants solution, I would like to say that i solve all my questions using the preexisting self made boilerplate in each and every contest. it seems the format was very similar of both the solutions but i guarantee you that there was no connection between both the solutions and i wrote mine the way i usually write them. Please check this issue and a response on this issue would be helpful. And the logic was pretty straightforward for the question as it was just counting which section of either (1's and 3's) or 2's will be the least plus the total nos of 4 to stop the formation of 12, 32 and any nos including 4.

bada_bhondu

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

Hello respected members , I received a notification saying I'd violated a rule in my submission of 2230C - Arrange the Numbers in a Circle . Could I please talk to one of the organizers/admins to appeal against this violation . I havent committed any form of plagiarism and had structurally broke down the questions into 2 cases when we had one vs multiple cards of frequency > 1. I did some trial and error and derived the exact formulae for both cases and implemented it. I did use a standard template which wasnt similar to some of my previous submissions which was a mistake on my end but the implementation was purely my own. If needed I can provide screenshots of the code in my ide or any other form of legitimacy. Could someone look into this it'd mean a lot thank you !

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

easy round!

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

BYE BYE XVIII

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

I solved 4 questions, but it is still showing skipped on my end and my rating has not been updated.