On the recent Div. 3 Round 995, I was curious if it's possible to optimize my code, without converting it to C++.
Submission for E (TL on Test 19, passed originally but failed during system testing bruuuh) https://mirror.codeforces.com/contest/2051/submission/297891152
Submission for G (ML on Test 9, I converted it to C++ after and it thankfully worked) https://mirror.codeforces.com/contest/2051/submission/297925190
Any advice?
I think if you print output for every test case separately, it will be much faster.