2013年1月31日
摘要:
1 经历无数次RE 最后来了一个TLE 先放着以后在做 o(︶︿︶)o 唉 2 #include<stdio.h> 3 #include<algorithm> 4 using namespace std; 5 typedef long long ll; 6 const int maxn = 500100; 7 struct node1 { 8 int max_sub_x, max_sub_y; 9 ll max_sub, max_suffix, max_prefix; 10 int max_suffix_x; 11 int max_prefi... 阅读全文
posted @ 2013-01-31 23:08
startgo
阅读(333)
推荐(0)
2013年1月30日
摘要:
1 #include<stdio.h> 2 #include<math.h> 3 #include<algorithm> 4 #include<iostream> 5 using namespace std; 6 struct Point { 7 double x, y; 8 Point(double x = 0, double y = 0) : x(x) , y(y) {} 9 }; 10 typedef Point Vector; 11 Vector operator + (Vector A, Vector B) { return Vecto 阅读全文
posted @ 2013-01-30 11:54
startgo
阅读(130)
推荐(0)
摘要:
1 #include<stdio.h> 2 #include<math.h> 3 #include<complex> 4 using namespace std; 5 struct Point { 6 double x, y; 7 Point(double x = 0, double y = 0) : x(x) , y(y) {} 8 }; 9 typedef Point Vector;10 Vector operator + (Vector A, Vector B) { return Vector(A.x + B.x, A.y + B.y);}11 Vec 阅读全文
posted @ 2013-01-30 10:27
startgo
阅读(213)
推荐(0)
2013年1月16日
摘要:
1 #include<stdio.h> 2 #include<string.h> 3 const int N = 110; 4 int dp[N][N]; 5 bool v[N][N]; 6 int a[N], n, sum[N]; 7 int min(int a, int b) { 8 return a < b ? a: b; 9 }10 int dfs(int l, int r) {11 if(v[l][r])12 return dp[l][r];13 v[l][r] = 1;14 int m = 0;15 for(int i = ... 阅读全文
posted @ 2013-01-16 12:27
startgo
阅读(120)
推荐(0)
2013年1月9日
摘要:
1 #include<stdio.h> 2 #include<string.h> 3 const int E = 2020; 4 const int N = 55; 5 struct edge { 6 int t, next; 7 }e[E]; 8 int head[E], tot, root[N], map[N], degree[N], n, left[E], right[E], top; 9 bool v[E];10 void init() {11 top = tot = 0;12 memset(degree, 0, sizeof(degre... 阅读全文
posted @ 2013-01-09 11:53
startgo
阅读(162)
推荐(0)
2013年1月8日
摘要:
1 #include<stdio.h> 2 #include<string.h> 3 const int N = 30; 4 char map[N][N]; 5 struct node { 6 int dir, x, y, time, color; 7 }q[N * N * 5 * 4 * 10], cur, next, start, end; 8 int m, n; 9 bool judge(node cur) { 10 if(cur.x >=0 && cur. x < m && cur.y >=0 && 阅读全文
posted @ 2013-01-08 14:03
startgo
阅读(284)
推荐(0)
摘要:
1 #include<stdio.h> 2 #include<string.h> 3 const int N = 1010; 4 char map[N][N]; 5 int time[N][N]; 6 bool v[N][N]; 7 struct node { 8 int x, y, minute; 9 }q[N * N], joe, fire, cur, next;10 int dir[4][2] = {-1, 0, 1, 0, 0, -1, 0, 1}, r, c;11 bool judge(node cur) {//边界判断12 if(cur.x >= 0 阅读全文
posted @ 2013-01-08 13:37
startgo
阅读(184)
推荐(0)
|
|