摘要: 简单的BFS,可是看错题了,从原来的基础上改的,改的很乱,边界什么的。错了好几次。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: maze1 5 */ 6 #include <iostream> 7 #include <cstdio> 8 #include <cstring> 9 #include <cmath> 10 #include <algorithm> 11 using namespace std; 12 char p[501][501]; 13 int o[501][501]; 14 int q 阅读全文
posted @ 2012-11-14 19:55 Naix_x 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 这个和金华的小模拟很相似,题目中啥也没说,想枚举100000秒,试一下水的。结果就水过了,1Y。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: ttwo 5 */ 6 #include <iostream> 7 #include <cstdio> 8 #include <cstring> 9 #include <cmath>10 #include <algorithm>11 using namespace std;12 int x[4] = {-1,0,1,0};13 int y[4] = {0,1,0, 阅读全文
posted @ 2012-11-14 17:13 Naix_x 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 题目链接题意真纠结啊。神马盈余,负债的。。。差不多看懂样例了,是反正一年12个月可能赚钱,可能赔钱。。。题意:1-5月, 2-6月....8-12月,做8次统计,在统计内的5个月,整体上都是赔钱的。求这一年可能盈利多少。第一想法枚举,2^12次方,然后TLE,换了乱搞办法,和暴力的对拍,讨论5个月,盈利最多的情况下,依旧赔钱,乱搞一下就行。 1 #include <iostream> 2 #include <cstdio> 3 #include <cstring> 4 #include <cmath> 5 #include <algorit 阅读全文
posted @ 2012-11-14 16:14 Naix_x 阅读(168) 评论(0) 推荐(0) 编辑