- 博客(17)
- 收藏
- 关注
原创 Codeforces Round #259 (Div. 2) C - Little Pony and Expected Maximum
一个 m 面的色子掷 n次,求出现的最大值得期望。递推,
2014-10-31 21:20:42 473
原创 hdu 4276 树形dp + 最短路
#include#include#include#include#define N 105using namespace std;int a[N];struct node{ int to, nxt, cost;}edge[N * 3];int head[N];int dp[N][N * 5];int cnt;int n, t;int tt;voi
2014-10-30 21:32:35 690 2
原创 hdu 4546
优先队列的#include#include#include#include#includeusing namespace std;#define N 10005typedef __int64 LL;struct node{ LL now; int pos;}a;LL c[N];struct cmp { bool ope
2014-10-19 23:03:28 460
原创 Codeforces Round #269 (Div. 2)
B: n个问题,每个问题都有对应的难度,求至少三个不同的序列使得做题的难度是非递减的直接暴力 &&
2014-10-19 13:56:36 490
原创 hdu 4545
#include#include#includeusing namespace std;#define N 1005struct node{ int num; char c[N];}a[30];char z[N], x[N];int main(){ int tot; scanf("%d%*c", &tot); for(int p
2014-10-18 13:18:53 553
原创 通讯录
#include #include #include #include #include #include #include using namespace std;typedef struct Node{ char id[100]; //学号 char name[100]; //姓名 char tel[100]; //电话号码 struct Node *ne
2014-10-17 20:37:29 524
原创 ZOJ 3805 Machine
In a typical assembly line, machines are connected one by one. The first machine's output product will be the second machine's raw material. To simplify the problem, we put all machines into a two-dim
2014-10-12 16:20:06 557
原创 KMP next[]小贴士
nxt 失配后希望找到的最佳位置,i 当前的匹配点(模式串或者目标串)的下标j 当前的模式串的下标预处理时nxt[j]为模式串下标从1~j 的前nxt[j] 与后 nxt[j] 相等的最大数目(abab 为2)为什么有nxt,比如ababc,与ababd,当匹配到c才失配时,希望能从第二个a开始匹配(就是把我们自己一眼看穿的最佳位置通过next告诉电脑..)真正匹配时从
2014-10-08 21:15:04 461
原创 475 B.Strongly Connected City
给出一张图问是不是强连通#include#include#include#includeusing namespace std;#define N 500struct node{ int from, to, nxt;}edge[N * 2];int head[N];char l[N], h[N];int m, n, tot;int low[N], dfn[N], b
2014-10-06 15:07:05 547
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人