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
Auto comment: topic has been updated by BrynzaMasterZa228 (previous revision, new revision, compare).