INOI 2016 Discussion

I tried three time to edit “&lt” means “<” and “&gt” means “>”

I am approaching the Wealth Disparity via a graph solution. My code is pasing all the testcases except one, which is showing the following error: RE (SIGABRT)(0.540000)

My code is here: WEALTH_DISPARITY

Can anybody please tell me what exactly this error means and why am I getting this error?

It probably is too much memory. Use int instead of long long

@mathecodician It’s the same even after using int instead of long long

I used Rajat’s solution, O(n^3), but I am getting TLE for 2nd sub task. Can anyone please suggest a faster solution ?