Hi everyone!
I'm trying to solve problem 1857F: https://mirror.codeforces.com/contest/1857/problem/F, but for some reason I received the TLE result and right now I cant find any mistake that make my code trash.
Here is my submission: https://mirror.codeforces.com/contest/1857/submission/226425222.
I'm really grateful if someone help me to get rid of this problem. Again thank everyone so much for reading my first blog!
(Also I apologized for my bad english I'm just in B2 level :((( )
Auto comment: topic has been updated by NotHandsomeBoizz (previous revision, new revision, compare).
I think the reason why it got TLE in test 4 because it got integer overflown at some points.226470136, this is the submission I copied from you but add "#define int long long" but it got TLE on test 50 because you used unordered_map(for the reason, read this blog:https://mirror.codeforces.com/blog/entry/62393 ), here is the accepted:226470250
Thank you so much!