2012年2月16日

C语言的一个关于类型的小陷阱

摘要: 类型的差别造成奇怪的运行结果——输出错误、无法继续输入等新增:找出下面代码的错误:# include <stdio.h># include <string.h> # define MAXN 10005 int main(){ short m, n, i, ans, tmp, t[MAXN]; while (~scanf("%d%d", &n, &m)) { memset(t, 0, sizeof(t)); for (i = 1; i <= m; ++i) { scanf("%d", &tmp); .. 阅读全文

posted @ 2012-02-16 18:37 getgoing 阅读(294) 评论(0) 推荐(0) 编辑

csu1002 A+B(III)

摘要: RE 阅读全文

posted @ 2012-02-16 16:29 getgoing 阅读(446) 评论(0) 推荐(0) 编辑

bfs poj2965

摘要: TLE了 不知道怎么办 还是用枚举?// poj 2965 bfs & STL queue# include <iostream># include <cstring># include <queue>using namespace std;const unsigned short flip[] = {0x111f, 0x222f, 0x444f, 0x888f, 0x11f1, 0x22f2, 0x44f4, 0x88f8, 0x1f11, 0x2f22,... 阅读全文

posted @ 2012-02-16 00:07 getgoing 阅读(204) 评论(0) 推荐(0) 编辑

导航