Can you please explain thought process behind adding (need >= 2e9) condition at 23:00 minute ?
@kotatsugame26 күн бұрын
In this code, all vertices in the subtree of vertex u, including in particular vertex u itself, must have the value >= need. Therefore, if need > max(a), there is no way to satisfy this condition.
@sxzz526 күн бұрын
@@kotatsugame Oh I see, thanks a lot.
@sxzz526 күн бұрын
Can i ask a follow up if its okay ? Shouldn't the dfs automatically return false when it eventually reaches leaf node for these need > max(a) cases ? If yes, why do we require the extra condition (after G[u].empty() check) ? I read some comments on CF that this has something to do with dealing with overflows, but can't understand exactly why or how ? Or maybe reason is different.
@kotatsugame26 күн бұрын
@@sxzz5 For each level down the tree, the value of need roughly doubles (consider the case where all a's are 0). This would immediately cause an overflow, and the condition at the leaf would be misjudged.
@sxzz526 күн бұрын
@@kotatsugame This explains it very well. Got it finally. Thanks again.
@ashishchokhani9084Ай бұрын
Hey, if possible, can u write in English, we can use subtitles for translation of audio but its difficult to understand the text. The way u explain is truly appreciable.
@seraph1007Ай бұрын
no bro hes participating in contest, go learn japanese
I genrally read your solution's for ABC -C problems , the way you write code is pretty concise and simple for me to understand.(Begginer here :{ ) THANK YOU @kotatsugame.
@kotatsugameАй бұрын
I am very glad to hear it!
@SP-od4vvАй бұрын
@@kotatsugame 🙏🙏🙌
@PedroOiАй бұрын
Thanks for the video! If possible, please put the drawing on paper in full screen
@kotatsugameАй бұрын
That may be difficult, but I am currently trying to improve on the angle of view/lighting by purchasing a new camera.
@user-wq7ph5ig2u2 ай бұрын
ASMR
@user-vg2cv9cr4e2 ай бұрын
can u explain in english??? from upcoming contests??
@yasum12 ай бұрын
bro, who let them cook C? 💀
@user-vg2cv9cr4e2 ай бұрын
Bro can u speak english?😅,, ,btw thankyou for the awesome content