A variety of possible causes of errors (not regularly updated)

Record what about the various causes of errors, as long as the mind is an outline is not prone to error.

Wrong Answer

1. Do not open long long to see our ancestors, blood and tears of the lesson ah!

2. open a small array, and cross-border location of windows will be initialized to 0, and the linux is inexplicable assignment (You were hacked!)

CF1249A tragedy int f [101]; if (f [x-1] | f [x + 1]); 1 <= x <= 100, when the program code much contractors who want the presence of such stream Hack God!

3.freopen problem is not much to speak, used to open is a good thing, after all OJ on the wrong time and again much smaller than the cost of CSP wrong.

 

Runtime Error FAQ

1. open a small array.

2. scanf did not bring & take the address.

3. stack, queue, etc. is not determined empty () is called.

4. main function lazy when return printf ( ""), 0; 0 not out!

5. vector determination forgot to give p p <v.size () to use directly v [p] with lower_bound or upper_bound.

6. Use of iterators: set.erase (* it) Note * not fall!

 

Compile Error

1. Keyword: y1, plus, next, pipe, link (also seemed) 

2. bool operator <(const node & other) const <- const can not fall out of the

 

 

Guess you like

Origin www.cnblogs.com/AppleC/p/11729221.html