Runtime error on Books on CSES problemset.
For some testcases I am getting a run time error while it runs fine on my local machine. Problem code. Any help would be awesome.
Codeforces Round 945 Solution Discussion (with myself)
Atcoder ABC #354 Solution Discussion