上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 182 下一页
摘要: 模拟View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;#define maxd 20#define d_length 16#define dish_side 20#define maxl 25int d[maxd];int n;int dish[2][maxl][maxl];int dir[5][2] ={{ 0, 0 },{ 0, 1 },{ 1, 0 },{ 0, -1 },{ -1, 0 阅读全文
posted @ 2013-01-05 14:10 undefined2024 阅读(263) 评论(0) 推荐(0)
摘要: bfsView Code #include <iostream>#include <cstdio>#include <cstring>#include <cstdlib>#include <queue>using namespace std;#define maxn 30struct Point{ int x, y;} s;int n, m;int dir[8][2] ={{ 1, 0 },{ 0, 1 },{ -1, 0 },{ 0, -1 },{ 1, 1 },{ -1, 1 },{ 1, -1 },{ -1, -1 } };ch 阅读全文
posted @ 2013-01-04 19:21 undefined2024 阅读(272) 评论(0) 推荐(0)
摘要: 极坐标排序+叉积判断夹角View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>#include <cmath>#include <algorithm>using namespace std;#define maxn 200#define eps 1.0e-8struct Point{ int x, y;}s, point[maxn];double r;int n;bool operator < (const 阅读全文
posted @ 2012-12-31 14:32 undefined2024 阅读(221) 评论(0) 推荐(0)
摘要: 简单题View Code #include <iostream>#include <cstdio>#include <cstdlib>#include <cstring>using namespace std;int main(){ int t; scanf("%d", &t); for (int i = 0; i < t; i++) { printf("Scenario #%d:\n", i + 1); int a, b; scanf("%d%d", &a, &a 阅读全文
posted @ 2012-12-30 16:31 undefined2024 阅读(169) 评论(0) 推荐(0)
摘要: 线段覆盖,注意从右往左挪的情况View Code #include <iostream>#include <cstdlib>#include <cstdio>#include <cstring>#include <algorithm>using namespace std;#define room_num 400#define maxn 205struct Elem{ bool start; int pos;}elem[maxn];int n;int elem_cnt;bool operator < (const Elem &a 阅读全文
posted @ 2012-12-29 20:20 undefined2024 阅读(241) 评论(0) 推荐(0)
上一页 1 ··· 38 39 40 41 42 43 44 45 46 ··· 182 下一页