I am having trouble understanding the cause of getting memory limit exceeded for this problem

Revision en1, by zzzzsust19, 2022-12-09 13:55:47

This is my submission 184446767 The problem link: https://codeforces.com/problemset/problem/1620/E

At first I thought I was getting MLE for using maps, then I used vector for mapping the elements of list. Not to mention, the number of elements in which test case I am getting MLE is surprisingly small. It's only 1000 * 2 items in array at most.

Now, I created a separate vector to store queries, it's a 2d vector. I am using first dimension to store the index where the query starts. The second dimension implies the number of queries in that index. This is the only thing that looks sus to me. Otherwise I don't get the cause of MLE

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English zzzzsust19 2022-12-09 13:55:47 747 Initial revision (published)