Why are 2x2 matrices that are flattened much faster?

Правка en1, от limabeans, 2020-07-14 20:52:19

I was solving this problem and was getting TLE (3s) when using vector<vector<ll>> as my 2x2 matrix, then I converted it to array<ll,4> and I passed in 500 ms. Why is it so much faster?

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский limabeans 2020-07-14 22:58:32 557 Tiny change: 'as TLE so I tried u' -> 'as TLE so at first I tried u'
en1 Английский limabeans 2020-07-14 20:52:19 289 Initial revision (published)