摘要:
先确定M的大致范围后即可求。#include #include #include #include #include #define LL __int64#define N 60000LL square[N];LL spre[N];void init(){ spre[0]=0; spre[0]=0;... 阅读全文
posted @ 2014-12-06 21:17
chenjunjie1994
阅读(188)
评论(0)
推荐(0)
摘要:
分组背包而已。注意的是,每个时间T,要把一组的全加进去比较一次。#include #include #include #include #include #define N 205#define T 41000using namespace std;int dp[T];struct node{ in... 阅读全文
posted @ 2014-12-06 20:43
chenjunjie1994
阅读(106)
评论(0)
推荐(0)
摘要:
单调队列来做,简单题了。维护一个最大的,一个最小的即可。#include #include #include #include #include using namespace std;#define N 1001000int num[N];int bigque[N],bhead,btail;int... 阅读全文
posted @ 2014-12-06 17:04
chenjunjie1994
阅读(180)
评论(0)
推荐(0)
摘要:
简单的tarjan#include #include #include #include #define N 10010#define M 20010#define C 2001000using namespace std;struct edge{ int v,c; int next;}City[M... 阅读全文
posted @ 2014-12-06 16:28
chenjunjie1994
阅读(141)
评论(0)
推荐(0)

浙公网安备 33010602011771号