↵
I was solving the above problem using C++ vector of maps and i got memory limit exceeded. But I solved the same problem with the same logic using vectors of vector and got accepted solution .I am unable to understand why the solution using maps failed.↵
↵
Solution using maps:-https://codeforces.com/contest/1996/submission/273021146↵
↵
Solution using vectors of vector:-https://codeforces.com/contest/1996/submission/273020910↵
↵
Can someone expalin?↵