Various errors possible cause (no time update)

Record the approximate reasons for various errors. As long as you have an outline in your mind, it is not easy to make mistakes.

Wrong Answer

< span style="color: #ff0000; font-size: 15px;">1. Don’t open long long to see your ancestors, the lesson of blood and tears!

2. The array is smaller, the out-of-bounds position windows will be initialized to 0, and linux will be inexplicably assigned< span style="color: #3366ff;">(You were hacked !)

CF1249A tragedy int f[101];if(f[x-1]|f[x+1]);1<=x<=100, who would have imagined this kind of Hack God flow existed in the code program!

3. The problem of freopen is still not to be said. It’s a good thing to get used to opening, after all, on OJ A mistake is much less expensive than a CSP mistake.

Runtime Error FAQ

1. The array is small.

2. Scanf did not bring & take address.

3. Stack, queue, etc. are called without determining empty().

4. When the main function is lazy, return printf(“”),0; 0 can not be dropped!

5. Use lower_bound or upper_bound for vector to get p and forget to judge p

6. Use of iterator: set.erase(*it)Note* Can’t fall!

Compile Error< /p>

1. Keywords: y1, plus, next, pipe, link (it seems to be the same) p>

2. bool operator <(const node&other)const <- The outside const cannot be dropped

Leave a Comment

Your email address will not be published.