I got TLE on this problem, but I already used the fastest algorithm I can think of. Please help me. Thank you.
code removed after AC.
If you use map() instead of the LC you'll get AC.Code should be removed.