上一页 1 ··· 109 110 111 112 113 114 115 116 117 ··· 182 下一页
摘要: bfsView Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 55struct Point{ int x, y;}q[maxn * maxn];int n, m, ans;int map[maxn][maxn];bool vis[maxn][maxn];int dir[4][2] ={{ 0, -1 },{ -1, 0 },{ 0, 1 },{ 1, 0 } };bool o 阅读全文
posted @ 2011-07-12 09:41 undefined2024 阅读(239) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <algorithm>using namespace std;char st[100];int main(){ //freopen("t.txt", "r", stdin); while (scanf("%s", st)) { if (strcmp(st, "#") == 阅读全文
posted @ 2011-07-12 09:07 undefined2024 阅读(286) 评论(0) 推荐(0)
摘要: dfsView Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 25int n, m;int f[maxn], s[maxn];int ans;void dfs(int cow, int sum){ if (ans == 0) return; if (s[cow] + sum < m) return; if (sum >= m) { ans = min(ans, s 阅读全文
posted @ 2011-07-12 08:32 undefined2024 阅读(172) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;int main(){ //freopen("t.txt", "r", stdin); int t; scanf("%d", &t); while (t--) { int year, month, day, hour, minute, second; scanf(" 阅读全文
posted @ 2011-07-10 18:00 undefined2024 阅读(179) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxn 100int n, w, s;char name[maxn][100];bool out[maxn];int main(){ //freopen("t.txt", "r", stdin); scanf("%d", &n); for (int i = 阅读全文
posted @ 2011-07-10 16:23 undefined2024 阅读(276) 评论(0) 推荐(0)
上一页 1 ··· 109 110 111 112 113 114 115 116 117 ··· 182 下一页