Flamire's blog

By Flamire, history, 10 months ago, In English

Hello, Codeforces! We're glad to invite you to take part in Codeforces Round 1064 (Div. 1) and Codeforces Round 1064 (Div. 2), which will start on Nov/16/2025 17:35 (Moscow time). You will be given 6 problems and 2 hours to solve them in both divisions.

The problems were authored and prepared by le0n and me.

We would like to thank:

Score distribution:

  • Div. 1: $$$500-1000-1500-2500-3000-4000$$$
  • Div. 2: $$$500-750-1000-1500-2000-3000$$$

We hope you'll enjoy the problems!

UPD: Congratulations to top $$$5$$$ in Div. 1 and Div. 2.

Div. 1:

  1. maroonrk, achieving perfect score at an astonishing 01:18:30!
  2. JDScript0117, with an outstanding comeback at 01:55:46!
  3. Benq
  4. ksun48
  5. Nachia

Div. 2:

  1. __lucailie, with a final solve at 01:59:15!
  2. weertyu
  3. su_da
  4. Axiom_
  5. WangYuanyi

First solves:

Div. 1:

A: ksun48
B: Benq
C: OrangeEye
D: Benq
E: Benq
F: maroonrk

Div. 2:

A: f___off
B: Animesh--__--
C: lemmec0de
D: Doraemon-_-
E: Shakhzod_Toshpulatov
F: kyUUKoU

UPD: Editorial is out!

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

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

not counting this one, 5 of the last 6 div-1 rounds have had an LGM as one of the setters (and there wasn't a single LGM setter in rounds 1013-1047 before these)

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

Tested 3 months ago and almost forgot everything, can I participate?

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

Tested, I

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

Didn't test 3 months ago and almost remember nothing, can I not participate?

»
10 months ago, hide # |
 
Vote: I like it -210 Vote: I do not like it

Help me reach -99 in contribution

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

oh I tested

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

Hoping for an easy B than C this time.

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

As a tester, why can't I remember testing it?

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

hope everyone gets positive delta <3

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

Wow, I just saw an announcement (it poped in the middle of the website, as usual round announcements). If I'm not mistaken, if somebody missed it, it's only possible to see it after the round starts. Is that correct and if so, is that intended?

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

    In case anybody is interested, this announcement is as follows.


    General announcement

    Hacking is disabled in problem A-D (in div. 2). In problems A-D, system tests are equal to pretests; in problems E-F, system tests are equal to pretests plus hacks.

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

      I think I saw it about div1, so I guess there are 2 of those. Mine said A-B has hacking disabled and everywhere pretests = systests (+ hacks if possible).

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

I think DIV2C is same as DIV1A based on Score distribution

»
10 months ago, hide # |
 
Vote: I like it -96 Vote: I do not like it

My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064. My rating is 1064.

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

hi

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

Best of luck everyone!!! Hope you increase your rating :) !!!!

»
10 months ago, hide # |
 
Vote: I like it -24 Vote: I do not like it

Vote up if you think the problems are nice.

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

can someone check div2 B, simulate the test case 1 iteration number: 6,7,9. upon simulation answer comes out as 6,5,6 yet in the answer of the testcase it shows differently.

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

I have mastered the art of speedforces

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

$$$C$$$ is such a shit problem. 4k solve difference between $$$C$$$ and $$$D$$$ in Div2. Speedforces Shit round.

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

div2B is a strange problem for me, it cost me 20min to solve it :(

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

In my opinion, D2C / D1A was way to easy to guess

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

    can you please tell wat did you guess ?

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

    so D2C is a DP ?from a worthless mid schooler-_-!

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

      no its greedy

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

      greedy

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

      no, you just take away the pair with the smallest maximum every time, can be done with sets/priority_queues

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

        how do we know this is best .. I guessed same but without proof

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

          Consider x < y < z, if we first take (y, z) with a cost of z then we will have to take another (x, z) with cost of z which makes the answer 2 * z, but if we take (x, y) and (y, z) that makes x + z which is smaller than 2 * z, basically we want to remove smallest numbers using smaller maximums

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

          You can prove it by comparing the process to the Kruskal algorithm.

          The only weird thing is that when you add an edge and remove it from the graph, a new edge is created (so the graph is "changing"). But this edge has a weight greater or equal to all the weights you have already added, so you are still adding them in the right order and you get a MST.

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

          The general approach is to first prove that the answer is no less than a certain value, and then construct a valid scheme to demonstrate that this value can be achieved.In this problem, we first disregard the cyclic condition and define b[i] = max(a[i], a[i+1]). The answer cannot be less than the sum b[1] + ... + b[n-1], because the larger of any two adjacent numbers must contribute at least once. Then, we can construct a sequence of operations to demonstrate that this value is indeed achievable.My code

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

        I'm like the only person that uses linked_list in the server.

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

        really? only can use ai and ai+1,the priority_queue would shuffle the order

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

          I forgot that we also have to delete additional pairs so priority queue won't work efficiently, I used set in the end, but the point was that we keep pairs of those, not individually

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

          You can also maintain $$$\text{left}[i]$$$ and $$$\text{right}[i]$$$. Initially, $$$\text{left}[i] = i-1 \mod n$$$ and $$$\text{right}[i] = i+1 \mod n$$$.

          Then you can handle deletion of index $$$i$$$ by setting $$$\text{left}[\text{right}[i]] = \text{left}[i]$$$ and $$$\text{right}[\text{left}[i]] = right[i]$$$.

          When merging $$$a_i$$$ with $$$a_{i+1}$$$, you delete the index of the minimum value and insert the new edge into the priority queue.

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

      I used divide and conquer + Sparse Table to find the position of the maximum element

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

      I spent a lot of time on this problem during the competition but still couldn't solve it. In fact, I overcomplicated it. All I needed to do was calculate all the expenses first, get a total expense, and then subtract the largest one. There was no need for a priority queue or anything else. I felt like crying when I realized the truth. (╥﹏╥)

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

      I actually ended up finding an O(n) solution — since its a ring you can just rotate the array so that the maximum is on the side and then just find the sum of the maximum of all adjacent pairs in your rotated array: 349299008 (In the comment where I wrote "max of difference" I meant "max of pairs")

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

speed forces ... so many quick solves till div2C but then div2D has less solves

I like the visualization for div2B

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

I don't think 1B/2D is that easy.

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

For D I had an idea, but it was already too late to implement it :(

Get an array with the amount of occurrences of the numbers and sort it decreasingly. a1 >= a2 >= ... >= ak What I got is that for each i, we can get the following amount of multisets that exclude elements which would come from a_j, j < i:

a_i * (Choices(a_{i+1},...,a_k) — (#choices with < a1 — ai elements))

Then, the sum would be the answer. For the testcases it seemed to work, at least.

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

I don't know about others, but for me personally, problem E was obvious, I came up with it after reading it, and I spent some time on problem D, but I couldn't pass it during the round (although I came up with a rough solution).

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

idk if only I felt it but problem B was way too tricky..

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

D2E uses very similar idea to 2147E - Maximum OR Popcount

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

Problems are great but why not 3h duration? I don't think 2h is enough for this round.

Personal complaint: I can pass 1C if I have 3~5 more minutes...

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

    3 hour contests are usually div1/div2 contests with 8 problems, not contests with 6 problems, and at least in my case, the extra hour would probably just end up with me staring at 1D with no ideas whatsoever for one more hour.

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

Is D1D a Kuhn-like algorithm?

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

I tried my best on D but couldn't come up with an approach, can someone hint it please.

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

Div 1 D reminded me of this recent problem + solution. Took me some time to make sure this is similar enough to apply a similar algorithm.

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

To me, d2E is quite easy but d2d is a little bit harder:(

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

    Can you provide a hint for D2E? Please put it under a spoiler tag.

    My observation was:

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

      Intuition: We need to look at the highest bit and use a number to satisfy this highest bit. We use the biggest number to achieve this somehow.

      Let query be $$$q$$$. Iterate those biggest elements $$$e$$$ starting from the biggest:

      • If $$$e \lt q$$$ and they have different highest bits, then add to $$$e$$$ until $$$e$$$ and $$$q$$$ have the same highest bit. Subtract $$$e$$$ from $$$q$$$ and continue.
      • If $$$e \lt q$$$ and they have the same highest bit, then subtract the highest bit from both $$$e$$$ and $$$q$$$ and then put $$$e$$$ back into your set of biggest elements. Then continue.
      • If $$$e \gt =q$$$, then finish.

      See 349330720.

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

        Thanks! I had a very similar solution, except instead of putting e ^ (1 << firstbit) back into the queue for reconsideration in case 2, I was trying to find the largest submask of $$$q$$$ that is $$$\le e$$$. 349323998

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

    Can't agree more

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

approach for C , hint ?

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

    I just simulated the process by eliminating the smallest remaining element, and merging it into its smallest neighbor. Note that since the element getting eliminated in the current round is the smallest, its neighbors will be greater than or equal to it.

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

      how to do index as if one value is deleted it stays in vector : 4,1,1,1,5 -> 4,1,5 but in vector its 4,-1,-1,1,5

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

        Maintain two arrays of length n:

        1. $$$prev[i] = $$$ index of the element that comes before the element at $$$i$$$-th index
        2. $$$next[i] = $$$ index of the element that comes after the element at $$$i$$$-th index

        You can reason about why $$$prev$$$ should be initialized with $$$[n-1, 0, 1, \dots, n-2]$$$, and $$$next$$$ with $$$[1, 2, \dots, n-1, 0]$$$. When processing the element at index $$$i$$$, we can eliminate it by doing 2 reassignments: $$$next[prev[i]] := next[i]$$$ and $$$prev[next[i]] := prev[i]$$$.

        You can see my implementation.

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

    solve the problem for a linear array first, then your answer will be the linear solution ignoring the largest interval (cost is largest element) of the circular array.

    There is a 1 for-loop solution for this problem dsu isn't needed

    hint for linear solution: consider the minimum contribution any element can have to an optimal solution

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

A, B, C resembles a Div. 3 problem

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

2D(1B) was an awesome difficult problem. It took me so long to reduce the problem into a knapsack variant tho.

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

    Same for me. It was very satisfying to get the correct output on the first run. I reduced it to:

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

How does D1C/2E make it to the contest?

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

    What's wrong with it? My only complaint is that D1B and D1C should be swapped, but that's a placement issue, not a problem issue.

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

      Does that imply it was overrated for its difficulty? I think D2D is too easy to be a D2E.

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

How to solve problem D? Couldn't clearly understand the problem, like what does modes mean?

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

I wonder how many AC 1C would have if the same idea didn't appear in a recent round (https://codeforces.me/contest/2147/problem/E )...

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

    As an author of that round, the first thing I did was to open my code from that round to see what ideas I could reuse, but it is not that similar.

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

Estimated time for the rating to roll out?(I'm quite excited)

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

amazing round! I spent around 45 minutes on B (lmao), then i solved greedly C using dsu, and I came up with an idea for E literally 2 minutes after the end

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

There is a possible wrong test case in Problem B — Tab CLosing.

In test cases 6, 7 and 9 the output given is 1, 2 and 2

Whereas the output according to the visulaizer given in the problem is 6, 5 and 6 respectively.

The output of my solution is also 6, 5 and 6 for these test cases respectively.

349309302

Problem link — https://codeforces.me/contest/2166/problem/B

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

    The answer cannot exceed two, first close the right tab without moving, then close the left tab without moving

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

Love the efforts you all make to create such high level questions :)

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

cant authors see ritesh_3822 submissions time... bro submitted till E in 39 mins with codes like huge submitted in 2mins.. do authors even see submissions of top people or people who are writing in their blog..

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

did authors cant see who are they putting in their blogs like many of div2 first solvers or div2 5 top participants are cheaters .. they can see their submissions.

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

Is it only me or 1C is much easier than 1B?

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

    I agree, solved C much faster than B

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

    Agreed, the conclusion in 1C that "only the top 30 are useful" is immediately obvious, whereas it took me a while to figure out the conclusion for 1B.

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

I want a rollback… maybe it will turn my 1996 into 1200 points

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

I solved div2(C) using a decreasing Monotonic Stack. First time I've gotten to implement this in a live contest!!!

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

guys i am in love with div2 C(div1 A problem)(cyclic mereging) i also made a video on that go check it out (not here for views(i mean i do but) literally i loved that problem so i wanted to make https://youtu.be/hcCuCJHx_OY ;).

»
10 months ago, hide # |
 
Vote: I like it -45 Vote: I do not like it

User ajmahim2020

During today’s contest Codeforces Round 1064 (Div. 2), the system skipped your submission for 2166A - Same Difference.

Screenshot-2025-11-17-004643

"It seems that you didn't understand the logic of the problem. In your first submission, your answer was skipped. After 3 minutes, you sorted the string and submitted it again, which wasn’t necessary. If you had written your first submission by yourself, you wouldn’t have done the sorting."

Screenshot-2025-11-17-004709

Screenshot-2025-11-17-004729

The reason i am writing because you did the same in Codeforces Round 1061 (Div. 2) in 2156A - Pizza Time.

Screenshot-2025-11-17-012527

You are copying code from somewhere or something like that in contest. you breaking contest rule and destroying the fairness.

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

    If you submit 2 correct submissions to the same problem the system will skip the first one automatically.

    In my opinion I think its pretty reasonable that someone might do this and I wouldn't say its conclusive evidence for cheating.

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

    if you check you would see both of my code is correct.so focus on your pregress.get a life bro.

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

Wow Speedforces and I got +42 delta

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

A hint for 2F/1D?

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

I believe that user weertyu is an AI cheating user. The variable names in his code are very similar to those of AI. They are composed of both lowercase and uppercase letters, and the variable names are long and complex.

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

    He weertyu has different I/O methods for each problems solved in the contest.

    Problem A — Uses builtin normal scanner with no custom made template.

    Problem C — Uses buffered reader and print writer but no helper methods of template, parsing the values each time taking input

    Problem D — creates custom class FastReader as in template to read input but uses builtin System.out.println() to print the output.

    Problem E — uses custom FastReader input but uses PrintWriter for output.

    In a single contest, using 4 different I/O methods is suspicious.

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

i love codeforces

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

I love codeforces

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

Is Problem C genuinely difficult, or does it only seem hard to me?

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

Kinda late to the party but I would like to add my two cents on div2(c) solution. My idea is if we look at the maximum element in this array than the element to the right of it has no choice but to make the pair with its right one. Because if it were to choose left one the anser would always be non optimal as the left one is the biggest. Now if we have the array as:

a1, a2, a3, a4, a5....an

and let a1 be the largest than a2 makes pair with a3. Now the smallest of both is replaced. Our answer will always contain max(a2, a3) because at some point a2 has to pair with the one at its right. If a3 < a2 than cost a2 will happen. Even if a3>a2 than cost a3 has to happen as only someone bigger can remove a3. I think this part is a bit fuzzy so I would appreciate if someone can complete my proof of why this actually works.

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

Can someone tell how can one comeup with the solution to problem c div2 from scratch like what things should one try after looking at such a problem.any general problem solving principles that turn out to be handy (please dont tell go practice,i know that is important but there is more to it than just practice)

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

    After looking at problem I realized that to get the minimum sum, I would have to make sure to merge the largest element at the end. I thought that it would require graphs or linkedlist where I have to recursively solve the question but if you just add all elements before the largest element in reverse order and then all the elements after the largest element in reverse order, you would get a list of elements in an anti clockwise cyclic order. Then just compare every 2 elements and add the maximum of the two to the sum and at the end add the max element.

    for the example:

    7

    1 1 4 5 1 4 1

    we exclude 5 and then have a list which is [4,1,1,1,4,1], sum=4+1+1+4+4=14 and add the max element and we get sum=19

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

Solution when?

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

Everyone is saying that C was very easy , but I am still not able to understand the main idea behind the solution . The n.log(n) solution specified in the editorial is using linked list which we usually avoid in cp and also I am not too comfortable with data structures as I am still new in CP. I saw another solution where we store max of all possible adjacent values and then sum the smallest n-1 of those which does give the answer. But the prove behind that is still unclear and also how will one intutively think about it.

Also I have been practicing CP from usaco guide and cses , are these resources sufficient to excel in CP and particularly on CF.

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

where is the tutorial ?

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

The editorial for Problem Div2D/Div1B is unclear. Can anyone explain, plz?

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

In the Second question of Div2, add this testcase a = 10, b = 25, n = 2 and check how many would have got wrong submissions.

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

I was cheated by divccc,he sat nearby and copy my code when I go to the toilet,NOW my score has been DNF

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

[deleted,idk who stole my account]

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

for problem C

If two adjacent x and y are equal can we choose where we merge x and y? for example 1 2 2 2 1 -> 1 2 2 2 or -> 2 2 2 1

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

For Div2C, does anyone know why working in reverse does not work? For example, greedily building the input array from the maximum element.

https://codeforces.me/contest/2166/submission/361319091