satyam343's blog

By satyam343, 5 months ago, In English

Hi everyone,
The ICPC Kanpur onsite regional round is ongoing from 10 AM IST to 3 PM IST. You can follow the public ranklist here

UPD1:

Congratulations to the top 3 teams!

UPD2:

We invite you to participate in ICPC Kanpur 2025 Onsite — Replay Round (Unrated), this Saturday, 27th December.

Time: 10:00 AM — 3:00 PM IST

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

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

Is the problemset public? If yes, where?

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

public problemset ??

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

Release the public problemset.

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

When will the editorial be out

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

Which problems did everyone found most interesting/toughest/tricky? Please share problemset link if available.

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

    Minimize Minimum, was most interesting problem for me

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

      What was your team's solution for Minimize Minimum?

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

        Let the given array a be of length n. We decompose it into two sequences s₁ and s₂, each of length n / 2.

        For every index i (using 1-based indexing): - The value of s₁[i] is fixed as a[2i]. - The value of s₂[i] must be chosen from the subarray a[i … 2i − 1].

        At index i, to minimize the contribution, the best choice for s₂[i] is the element whose value is closest to a[2i]. Any other choice would lead to a larger cost and s2[i] will lie in the range [i ... 2i - 1] we can solve it efficiently using multiset

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

As the only blue tester, problemset is pretty interesting!!

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

Release in cf gym

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

prady is orz great tutor great cp skills !

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

In problem J — Recursion was The final formula c(i+j,j) please confirm or deny..

code url

https://pastebin.com/XBYLcpcT

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

    no ;)

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

      Let $$$f_k(x)$$$ denote the value after $$$k$$$ steps. Then

      $$$ f_k(x) - f_k(x-1) = f_k(x-n). $$$

      Therefore, the difference satisfies

      $$$ f_{k-1}(x) = f_k(x-n). $$$

      Let

      $$$ q = \left\lfloor \frac{x}{n} \right\rfloor,\quad r = x \bmod n. $$$

      If $$$r = 0$$$, set

      $$$ r = n,\quad q = q - 1, $$$

      since the indices are taken from $$$1$$$ to $$$n$$$.

      Thus,

      $$$ f_0(x) = f_q(r). $$$

      Recurence Relation

      $$$ f_q(r) = f_{q}(r - 1) + f_{q-1}(r). $$$

      Finally, we obtain

      $$$ f_q(r) = \binom{r + q}{q}. $$$
»
5 months ago, hide # |
Rev. 2  
Vote: I like it +10 Vote: I do not like it

Please turn on practice mode for this problemset on codechef or some other oj.

Currently it shows 403 not available.

Also it would be great if you publish the editorial.

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

How to solve the problem H — Prefix Game? I came up with a logic, but it gives a wrong answer. Can anyone help me correct it?

I am mainly focusing on the "gap" condition, where v[i] — v[i+1] > 1, or v[i] == v[i-1].

I treat such cases as gaps, and according to my observation, the player who encounters the first gap wins the game. Can someone explain why this logic fails or how it can be corrected?

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

    Yes, you are on right track with gaps.

    You see whenever you make a move on certain prefix $$$i$$$, you decrease the gap between $$$i$$$ and $$$(i + 1)^{th}$$$ pile.

    So, every move only changes a certain gap

    Whenever gap between two piles becomes 0, we can consider them as a single pile

    So if we transform the array of piles into array of gap between piles, Then on each move a player can only decrease a single point in the gap array. A player would need to decrease atleast 1 from a point in the gap array. The game ends when all the elements in the gap array becomes 0.

    Sounds familiar?

    The problem just got transformed into normal nim game. If you know how to solve a nim game then you would know how to solve this transformed problem as well.

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

where is the editorial ?

can anyone provide link for that ?