I didn’t find any wrong case for my solution.
My solution: https://pastebin.com/RZAExuKL
I found a reference (AC) solution, and i wrote an input generator, but it did not find any difference.
Could anyone give me a test case which it give wrong answer?
What is the corner case?