Codeforces Round 1133 (Div. 1, Div. 2) is coming soon! Register here. ×

baizhorz's blog

By baizhorz, 3 years ago, In English

https://www.spoj.com/problems/NSITACMC/ This is my solution https://ideone.com/mQgKIE using 2d fenwick tree.

I am getting runtime error when sending my solution in C++14(gcc 8.3) and C++(gcc 8.3), however when i send it in C++(g++ 4.3.2) i get accepted.

Does anyone know why i get runtime error? What should i do to get accepted

Update: I solved it without 2d fenwick tree using scanline(kinda) on 2d technique

However, i would still love some answers on why my initial solution was incorrect

  • Vote: I like it
  • +14
  • Vote: I do not like it

»
3 years ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

Auto comment: topic has been updated by baizhorz (previous revision, new revision, compare).