|
+26
Why in D, statement is written very very confusing??? "After you decide how to deal with all the offers, the actual Billion Players Game is played." After that i started solving the problem thinking first you decide, then value in [L, R] is given. BUT it was oppsosite and very easy ): |
|
+43
Auto comment: topic has been updated by Muhammadali__ (previous revision, new revision, compare). |
|
0
shitty contest |
|
+6
Thanks! |
|
+6
Thank you! |
|
+9
Can someone share beautiful and clean code for D1? |
|
On
Ecrade_ →
Codeforces Round 1012 (Div.1, Div. 2, based on THUPC 2025 — Finals) Editorial, 14 months ago
0
The solution for problem C does not look good, ig. Can you write a more beautiful and clearer code? |
|
0
I think you misunderstood, we can move only to the down or right and thats not about shifts : we already know how many shifts we did and tmp[i] is the ith row AFTER shifts. so we can simply write : tmp[j] = min(tmp[j],tmp[j-1] + a[i][(j+shift)%m]) (if you still did not understand, proof is -> code, you can submit it) |
|
0
also tmp[(j-1)%m] can be changed to tmp[j-1](more clear...) |
|
+3
for D the second same for is unnecessary and also there is no path from [i][m — 1] to [i][1] so there is no need to write tmp[(j+m-1)%m] so simpler code is: (100% correct) |