02 2014 档案

codeforces #232 div2 解题报告
摘要:A:简单题;我们可以把点换成段处理,然后枚举段看是否被霸占了;#include#include#include#includeusingnamespacestd;intb[1000];intmain(){intn;cin>>n;intl,r;cin>>l>>r;for(inti=l;i>l>>r;for(inti=l;i=a) cout#include#include#includeusingnamespacestd;mapv;constintmod=1000000007;intc[18000][1000];intn,a[1000],cnt 阅读全文

posted @ 2014-02-28 23:47 forgot93 阅读(440) 评论(0) 推荐(0)

Codeforces Round #231 (Div2) 迟到的解题报告
摘要:题目A: 给一个火柴等式,可以从左边移动一根到右边,也可以从右边移到左边,但是不能移动“+”,”=“的火柴,而且加法里面的数都要大于0(很重要的条件),基本上注意到这点的都过了,没注意的都被HACK了。#include#include#include#include#include#includeusingnamespacestd;intn;intmain(){strings;cin>>s;inta,b;a=b=0;inti=0;for(;i#include#include#include#include#includeusingnamespacestd;inta[2000000] 阅读全文

posted @ 2014-02-25 17:03 forgot93 阅读(222) 评论(0) 推荐(0)

贴代码—CF230 DIV1 B
摘要:题目在此:http://codeforces.com/contest/392/problem/B 一直理解错了一句话,以为是用最小的move求最小的花费, 读错题目的有木有!!! 不懂汉诺塔的原理有木有!!!! 记忆化DP即可。。。。。。 方程: long long ans1=dfs(n-1,a,b)+cost[a][c]+dfs(n-1,b,c); long long ans2=dfs(n-1,a,c)+cost[a][b]+dfs(n-1,c,a)+cost[b][c]+dfs(n-1,a,c); dp[n][a][c]=min(ans1,ans2);完整代码:#in... 阅读全文

posted @ 2014-02-20 22:16 forgot93 阅读(241) 评论(0) 推荐(0)

C++ 运算符优先级
摘要:http://en.cppreference.com/w/cpp/language/operator_precedence以后没事来查查了,很实用 阅读全文

posted @ 2014-02-18 16:04 forgot93 阅读(145) 评论(0) 推荐(0)

导航