摘要: dp 记忆化搜索 做的时候像dfs#include #include #include #include using namespace std;struct tur{ int x,y,s;} tur[6000];int d[6000] = {},n;int flag[6000] = {};i... 阅读全文
posted @ 2013-07-31 15:29 xlc2845 阅读(89) 评论(0) 推荐(0)
摘要: 一个简单的dp 面值是5的倍数 将面值都除5 因为输出问题wa ....#include #include #include #include using namespace std;long long f[6020];int coin[] = {1,2,4,10,20,40,100,200,4... 阅读全文
posted @ 2013-07-31 15:18 xlc2845 阅读(125) 评论(0) 推荐(0)
摘要: 水题 排序 判符号#include #include #include using namespace std;struct pp{ int a; bool b; void f(int n) { if(n >= 0) { b ... 阅读全文
posted @ 2013-07-31 15:14 xlc2845 阅读(113) 评论(0) 推荐(0)
摘要: 找大于等于原数的最小回文数字 代码比较烂...........#include #include #include #include using namespace std;char s[2010];int main(){ scanf("%s",s); int len = strlen(... 阅读全文
posted @ 2013-07-31 12:20 xlc2845 阅读(106) 评论(0) 推荐(0)
摘要: 大数乘法 不会java 比赛的时候各种细节RE WA ........#include #include #include using namespace std;int un[] = {0,0,0,0,0,1,3,6,13,26,52,104,208,416,833,1667,3335,670... 阅读全文
posted @ 2013-07-31 12:17 xlc2845 阅读(109) 评论(0) 推荐(0)
摘要: 不管行列 总是先切割切割费用大的 代码比较烂 ......#include #include #include #include using namespace std;bool cmp(int a, int b){ return a > b;}int a[1010],b[1010];int... 阅读全文
posted @ 2013-07-30 19:40 xlc2845 阅读(132) 评论(0) 推荐(0)
摘要: dp 将石块按三个面存入队列 按底面积排序 dp就最大高度 按嵌套矩形最长路做做法#include #include #include #include using namespace std;struct tone{ int x,y,z; void t(int a, int b, in... 阅读全文
posted @ 2013-07-30 16:47 xlc2845 阅读(122) 评论(0) 推荐(0)
摘要: dp 1表示先手赢 #include #include #include #include using namespace std;int num[20];int f[1000007];int main(){ int n; while(scanf("%d",&n) == 1) {... 阅读全文
posted @ 2013-07-30 15:28 xlc2845 阅读(97) 评论(0) 推荐(0)
摘要: 留着#include #include #include #define lson l, m, rt > 1;// = (l+r)/2 build( lson ); build( rson ); return;}void Update( int po, int l, int r, ... 阅读全文
posted @ 2013-07-29 20:58 xlc2845 阅读(123) 评论(0) 推荐(0)
摘要: 又臭又长的烂代码 ......#include #include #include #include #include #define maxn 1010using namespace std;char a[1010];int num[10],last;//bool cc(int sum)//{//... 阅读全文
posted @ 2013-07-29 20:48 xlc2845 阅读(125) 评论(0) 推荐(0)