ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1100. Final Standings

If you use C/C++, got Crash(overflow) with a big array......
Posted by tiancaihb 9 Aug 2009 06:11
This is because the default size of OJ's stack is tooooo small.
int array can't be larger than 300000,while long long limit is 200000.(Maybe not very accurate).
So,if you want a bigger one,just add this at the biginning:


#pragma comment(linker, "/STACK:16777216")

which means setting the stack to 16MB,quite enough?
Re: If you use C/C++, got Crash(overflow) with a big array......
Posted by Moya 15 Jul 2011 20:27
you're right.Thank you for your help.
Re: If you use C/C++, got Crash(overflow) with a big array......
Posted by AterLux 16 Jul 2011 21:07
just don't allocate your arrays in stack.