Rainwater harvesting 2


My code works fine on other compilers but shows a segmentation fault in the coding blocks IDE.I’m not sure what’s wrong here

@armaanbhardwaj23 you are not getting segmentation fault but getting TLE cause time complexity of your code is O(n^2) try to write code for efficient time.

it says the following:
/bin/run.sh: line 4: 18 Segmentation fault (core dumped) ./exe.Even if its because of the complexity my code doesn’t run,it should atleast compile I believe.

Try hard refreshing or anything and submit again cause in my browser it is giving output.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.