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 :((( )