good visuals, great English narration!! -would the run time be like 3 * 2^n cause its 3 options to start but then you cant repeat what you picked last round if we were talking about the time complexity for the real problem? at 3:36 -also first time hearing about equivalence classes, seems like its related to equivalence relations. this idea you could explain better i think. thank you.
Suppose T(n) denotes the work done for n rounds. Then, T(n + 1) = 3*T(n). (because for each element in T(n) subset, you can check the last move played in O(1)). Therefore, the time complexity of the naive approach is 3^n. Equivalence relations is a pretty standard concept, didn't want to dive deep into it, otherwise it'd have made the video longer. Maybe some day I'll add more details in a separate video.
Thank You! And this was awesome.
please continue making videos like this also apart from codeforces content
as always your explanation is lit! thanks
good visuals, great English narration!!
-would the run time be like 3 * 2^n cause its 3 options to start but then you cant repeat what you picked last round if we were talking about the time complexity for the real problem? at 3:36
-also first time hearing about equivalence classes, seems like its related to equivalence relations. this idea you could explain better i think. thank you.
Suppose T(n) denotes the work done for n rounds. Then, T(n + 1) = 3*T(n). (because for each element in T(n) subset, you can check the last move played in O(1)). Therefore, the time complexity of the naive approach is 3^n.
Equivalence relations is a pretty standard concept, didn't want to dive deep into it, otherwise it'd have made the video longer. Maybe some day I'll add more details in a separate video.
What CF rating could this problem be?
1600 or 1700
1600.
Thanks guys.
also , this is a copy of atcoder problem