摘要: 这个问题还是很有意思的,两个人分别按最优策略从两头取数,问最后的结果。 很简单的一个思路是爆搜就行,当然肯定会超时的。记忆化 一下,就过了。代码真短啊。。。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: game1 5 */ 6 #include <iostream> 7 #include <cstdio> 8 #include <cstring> 9 #include <cmath>10 using namespace std;11 int sum[101],dp[101][101],p[101];12 int d 阅读全文
posted @ 2012-12-02 19:32 Naix_x 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 以前做过类似的。 1 /* 2 ID: cuizhe 3 LANG: C++ 4 TASK: range 5 */ 6 #include <iostream> 7 #include <cstdio> 8 #include <cstring> 9 #include <cmath>10 using namespace std;11 #define N 50112 char str[N][N];13 int key[N][N],x[N][N],y[N][N];14 int o[N],map[N][N];15 int Min(int a,int b,in 阅读全文
posted @ 2012-12-02 18:49 Naix_x 阅读(231) 评论(0) 推荐(0) 编辑