I didn't expect we should to be so stringent on a solution with O(N^2) memory when N is a mere 1000. I suspect that LC judger somehow calculate the accumulated memory across multiple cases. I know if I use a global 2D array it will pass, and AFAIK the local STL vector style used to be passable.
@cuiaoxiang We did not change the way of calculating memory usage. We have increased our memory limit and we're rejudging all affected submissions, sorry about that.