Блог пользователя Dominater069

Автор Dominater069, история, 10 месяцев назад, По-английски

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!

  • Проголосовать: нравится
  • +22
  • Проголосовать: не нравится

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Yes i will participate

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

Contest starts in ~ 30min.

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
10 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
»
10 месяцев назад, скрыть # |
Rev. 5  
Проголосовать: нравится +10 Проголосовать: не нравится

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 месяцев назад, скрыть # |
Rev. 2  
Проголосовать: нравится +31 Проголосовать: не нравится

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