How to test large testcase files?

I downloaded the test cases file from the mock test webpage

For the question up down sequence, the 6th and 7th test case file result in a ‘Segmentation Fault’ with my code. However, the code gets an AC on all test cases if i submit it on the problem page on codechef. Most probably it has to do with some limitations on my computer.
So, how do I go about testing these large testcase files offline? Will I face such a problem during the actual exam?

Thank You!

Probably because the stack size is limited. Try running “ulimit -s unlimited” on the terminal before executing your code.

2 Likes

Thanks! Now it is working