How to solve the uneasily discovered runtime error in acm and poj

Source: Internet
Author: User

It took a long time to refresh 2635 questions on poj today. There are always a variety of small faults. Finally, I tried a group of big data and passed the test. During submission, a runtime error occurs. Check the array and find that there is no cross-border error. Later, the search found that the array in the main of the local function was too large, resulting in stack overflow. It is defined as the global variable ac.

 

Reference:

Problem:
The reason for Stack Overflow is that the local variable a [1000] [1000] defined in main has nearly 4 MB space.
Local variables are allocated in the stack, so the 4 MB space is too large for the stack.

Original article address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.