- 博客(4)
- 收藏
- 关注
原创 codeforces 585F - Digits of Number Pi (dp + acauto)
585F - Digits of Number Pi #include #include #include #include #include #include #include #include #include #include #include using namespace std; #pragma comment(linker, "/STACK:
2016-02-26 14:36:38 407
原创 codeforces Simba on the Circle (dp)
Simba on the Circle 题意:长度为n的环,第i个数字为ai。 从起点s出发,走一个格子的花费为1,输出当前数字的花费为0,输出n个数的非递减序列的最小花费是多少,并打印方案。 若ai都不相同的话就很好做了,考虑值相同的ai作为一段,其中肯定有一个起点和终点,即这一段第一个走的i和最后一个走的i,从起点向同一个方向走到终点走完所有ai肯定是最优的。(终点就
2016-02-19 23:54:25 338
原创 Educational Codeforces Round 7
E. Ants in Leaves 被秀智商点 #include using namespace std; #define pii pair #define MP make_pair #define ls (i<<1) #define rs (i<<1|1) #define md (ll+rr>>1) #define N (1000000 + 10) #define M (
2016-02-14 11:05:46 229
原创 codeforces AIM Tech Round
#include using namespace std; #define N 1000 #define M 2000000 #define ULL unsigned long long #define LL long long #define mod 1000000007 int fst[N], vv[M], nxt[M], e; void init() {
2016-02-05 20:27:05 458
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人