Note: The text editorials will be provided by the authors of the round. This video tutorial acts as an additional resource for those who prefer video over text, not as a substitute for the text editorial.
2070A — FizzBuzz Remixed
Video
2070B — Robot Program
Video
2070C — Limited Repainting
Video
2070D — Tree Jumps
Video
2070E — Game with Binary String
Video








Am I the only one who thought that in C you need to find the SUM of penalties?
me also bro and wasted almost one hour
-100 elo or so just because I forgot to read
If you think like this, you need to use simulated cost flow, wqs binary, and use line segment trees to prevent running timeouts, which is a bit difficult for a C problem.
also do i ^.^
no, you are not alone... π π
but i realised quickly
I realized it's not the SUM of penalties when I have written the whole wrong code....
add me......
I initially thought D was a combinatorics problem and got WA several times, but now I see it's actually DP.
D is easier than usual and I'm completely stuck by the problem E. I try to guess the conclusion, but failed finally.
FOR 2070D — Tree Jumps
I know it's a DP question, but I approached it more like a combinatorial problem and got a WA as a result. I want to understand why I got WA. Can anyone provide a test case where my approach fails or explain the reason behind it?
308241176
When could the text editorial be visible awa?
Problem B doubt
def s_extend(s, n, k):
t = int(input())
for i in range(t):
n, x, k = map(int, input().split()) s = input() s_n = s_extend(s, n, k) pos = x cnt = 0 rp = 0 while k > 0: if s_n[rp] == 'L': pos -= 1 elif s_n[rp] == 'R': pos += 1 if pos == 0: cnt += 1 rp = -1 rp += 1 if rp == len(s_n): rp = 0 k -= 1 print(cnt)For problem B, how can you optimise further ?? Got TLE on Test 1 last input.
Your code runs for k which can be 1e18, what you can do to optimize is to find the first time it will cross origin let it be t1 and then find the first time it will come again to origin let it be t2. Now in this case the counts will be like t1+t2+t2+.....<=k the number of terms in this is our answer or you can say 1+(k-t1)/t2 My Code : 308252587 Feel free to ask if any doubt