Dominater069's blog

By Dominater069, history, 10 months ago, In English

We invite you to participate in CodeChef’s Starters 197, this Wednesday, 30th July, rated for 6 stars (i.e. for users with rating < 2500).

Time: 8:00 PM — 10:00 PM IST

Joining us on the problem setting panel are:

Written editorials will be available for all on discuss.codechef.com. Pro users can find the editorials directly on the problem pages after the contest. The video editorials of the problems will be available only to Pro users.

Also, if you have some original and engaging problem ideas, and you’re interested in them being used in CodeChef's contests, you can share them here. Hope to see you participating.

Good Luck!

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

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

Yes i will participate

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

Contest starts in ~ 30min.

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

Can anyone give testcase for Split problem? I am unable to figure out where it is failing

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

Hi Dominater069 , The winner of Div3 is indeed an AI cheater please remove him.

Evidence:

Proof 1

Proof 2

Proof 3

Proof 4

Proof 5

UPD : He/She cheated on previous starters and got this :

aaa

Here Profile

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

My approach for problem C EVCOST is quite different from the editorial; here's the core idea:

Moves of type 1 are deterministic, so we can predict what the next move(s) will be. Either

  • $$$111\dots12$$$ and we cannot predict the moves after this because type 2 moves are non-deterministic

Or

  • $$$111\dots11$$$ and we reach position $$$N+1$$$ so there are no more moves

Intuitively, we can think of the first case $$$\underbrace{11\dots1}_{k\text{ ones}}2$$$ as "$$$B_x$$$ is too large", so we first move to $$$x+k$$$ by paying $$$A_x + A_{x+1} + \dots + A_{x+k-1}$$$. We can fix this by assigning $$$B_x := \min(B_x, A_x + B_{x+1})$$$.

So now the only time we will make type 1 moves is when $$$x \geq x'$$$ for some threshold $$$x'$$$. We can solve this for all $$$x'$$$ to get an $$$O(n)$$$ solution.

Submission