### Zlobober's blog

By Zlobober, 4 years ago, translation,

Hi,

Today at 13:00 UTC there will be a Warmup Round of Yandex.Algorithm 2017. This is a great possibility for you to get familiar with TCM/Time contest format, and also to pass to the elimination round of the competition by successfully submitting at least one problem.

In order to participate in the competition, you have to register, the registration will remain open for the next week.

The link to the round will appear on the site of the competition shortly before the start of the round.

Good luck!

### Enter the contest!

UPD: Round is over, thanks for the participation! Congratulations to four participants who successfully solved all problems:

All participants with at least one successful submission pass to the elimination round of the competition.

UPD2: Contest editorial.

• +76

 » 4 years ago, # |   0 How to solve problem D?
•  » » 4 years ago, # ^ |   +5 I solved it with DP : DP[index][parity of previous element][parity of current element]. The main idea is you wouldn't use the operation twice on the same index.
•  » » 4 years ago, # ^ | ← Rev. 2 →   +13 Greedy — http://ideone.com/rhDW7F You do at-most 1 operation at each position. Fix operations on borders(4 cases), then starting from first position, do this greedy procedure — if any is of opposite parity, increment next 3. If last 2 are in order, update answer.
 » 4 years ago, # |   0 Thank you for this round!Couple things I want to mention: please add -DONLINE_JUDGE to gcc — it's common practice that boilerplate code includes #ifdef to not include some headers at judge problem statements (except for F) are kind of boring and too straight in the face. Maybe somebody likes it but it would be nice to have a "story" (even totally superficial)
•  » » 4 years ago, # ^ |   +32 I like short boring statements without story.
 » 4 years ago, # |   0 In problem C , What's wrong with first sorting the array and then doing a DP , where DP[i] = min(DP[i-1],DP[i-2]) + 1 . (DP[i-2] is only included when abs(arr[i] — arr[i-1]) <= 1 )
•  » » 4 years ago, # ^ | ← Rev. 3 →   0 It should be abs(arr[i] — arr[i-1]) <= 2, can choose arr[i] — 1 and arr[i — 1] + 1.
•  » » » 4 years ago, # ^ |   0 Thanks. Is there anything else wrong with this approach ? I still get a WA on case 41.
•  » » » » 4 years ago, # ^ |   0 I passed with this approach. maybe there is some minor bug in your program ? http://ideone.com/wW1ZsF
•  » » » » » 4 years ago, # ^ |   0 Thanks.
•  » » » » 4 years ago, # ^ |   0 I got WA-41 too. Can anyone guess the type of test case?
•  » » » » » 4 years ago, # ^ | ← Rev. 2 →   0 Maybe something like: 10 1 2 2 2 2 3 3 3 3 4 ans = 5
•  » » » » » » 4 years ago, # ^ |   0 Thanks, that helped
•  » » » » » » 4 years ago, # ^ |   0 Not for me. :(
 » 4 years ago, # |   0 F = mincost?
•  » » 4 years ago, # ^ |   0