- 博客(10)
- 收藏
- 关注
原创 uva 1371 dp+二分
#include #include #include using namespace std;const int maxn = 5050;const int maxl = 55;const int INF = 0x3f3f3f3f;int T, n, m, dp[maxn][maxl];char str1[maxn], str2[maxl];bool judge(int mid)
2016-08-24 20:54:07 597
原创 uva 12222 dp+细节
#include #include #include #include using namespace std;const int maxn = 205;const int INF = 0x3f3f3f3f;struct Car{ int t, d; void read() { scanf("%d%d", &t, &d); }};vectorA, B;int T,
2016-08-24 12:04:50 459
原创 uva 1443 dp+二分
#include #include #include using namespace std;const int maxn = 4E5 + 10;const int INF = 0x3f3f3f3f;int init[maxn], sum[maxn], dp[maxn][2], n, m, d, T;bool check(int x){ memset(dp, INF, sizeo
2016-08-23 21:18:44 500
原创 uva 1379 dp 贪心思想降低空间复杂度
#include #include #include using namespace std;#define now d[i]const int maxg = 210;int p[maxg][maxg], d[maxg], f[2][6][6][6][6], b[maxg][maxg], n, m, g, T;struct Node{ int id, x; bool opera
2016-08-22 21:14:05 525
原创 uva 10271 dp
#include #include #include using namespace std;const int maxn = 5050;const int maxk = 1010;const int INF = 0x3f3f3f3f;int T, k, n, init[maxn], dp[maxn][maxk];int main(int argc, char const *arg
2016-08-22 12:47:11 320
原创 uva 12589 dp
#include #include #include using namespace std;const int maxn = 55;struct Node{ int x, y; bool operator < (const Node &b) const//斜率排序 { if (y * b.x == b.y * x) return x > b.x; return y *
2016-08-20 11:53:51 384
原创 uva 1543 dp
#include #include #include #include using namespace std;const int maxn = 55;int n, m;double dp[maxn][maxn][maxn], p[maxn];double fun(double x1, double x2){ return sin(min(x1 - x2, 1 - (x1 -
2016-08-19 21:34:29 482
原创 uva 1633 状态dp
#include <cstdio>#include <cstring>using namespace std;const int maxn = 410;const int maxm = 1 << 11;const int MOD = 1E9 + 7;int dp[maxn][maxm], T, n, k;bool check(int ks, int kn){ for (int
2016-08-17 22:14:29 524
原创 uvalive 6864 扫描线和技巧
uvalive 6864 扫描线和技巧#include <cstdio>#include <cstring>#include <vector>#include <cstdlib>#include <algorithm>using namespace std;const int maxn = 110;struct Rectangle{ int x, y, p, d; v
2016-08-17 21:32:01 627
原创 uva 10641 dp
#include #include #include using namespace std;const int maxn = 110;const double eps = 1e-6;const int INF = 0x3f3f3f3f;int n, m, dp[maxn], c;bool flag[maxn];struct Point{ double x, y; Poin
2016-08-16 20:12:08 519
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人