摘要: algorithm 简单用法#include #include #include using namespace std;int student_Score[] = { 50,80,93,23,66};void pritit(int nScore){ cout= 60;}int main(int a... 阅读全文
posted @ 2014-08-05 20:54 gongpixin 阅读(482) 评论(0) 推荐(0) 编辑
摘要: 1.不可读入空格#include#includeusing namespace std;int main(){ char c[50]; scanf("%s",c); printf("%s",c); return 0;}2.可以读入空格用字符 ^ 可以说明补集。把 ^ 字符放为扫描集的第一字符时,构成... 阅读全文
posted @ 2014-08-05 15:41 gongpixin 阅读(213) 评论(0) 推荐(0) 编辑
摘要: C和C++的标准里从来没有定义过fflush(stdin)。也许有人会说:“可是我用fflush(stdin)解决了这个问题,你怎么能说是错的呢?”的确,某些编译器(如VC6)支持用fflush(stdin)来清空输入缓冲,但是并非所有编译器都要支持这个功能(linux下的gcc就不支持),因为标准... 阅读全文
posted @ 2014-08-05 15:16 gongpixin 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1.做题时偶然发现,else if()语句太多,也会造成超时,应该避免不必要的else if()语句,能用else 的直接用else ,别再加 else if()来判断了。见我的一个例子 POJ 1577 Falling Leaves(二叉搜索树)其实并非如此。。。else if一般不会导致超时,,... 阅读全文
posted @ 2014-08-05 09:41 gongpixin 阅读(238) 评论(0) 推荐(0) 编辑