How to reduce a two dimensional array into a vector

Правка en1, от Jahid, 2017-09-12 23:12:31

In Codeforces Round 433 Div 2, I have seen a solution of problem E. Since, the value of n was 200000. So it was not possible to solve the problem by declaring a n*n(200000*200000) array. But, In that solution a solver has used a vector efficiently instead of two dimensional array. I have tried but couldn't got this. Can anyone please help me on this?

Thanks in advance.

Problem : http://mirror.codeforces.com/contest/854/problem/E

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Jahid 2017-09-12 23:13:15 6
en1 Английский Jahid 2017-09-12 23:12:31 487 Initial revision (published)