|
|
back to boardIf you use C/C++, got Crash(overflow) with a big array...... 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. |
|
|