自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

原创 Codeforces Round #259 (Div. 2) C - Little Pony and Expected Maximum

一个 m 面的色子掷 n次,求出现的最大值得期望。递推,

2014-10-31 21:20:42 473

原创 CF DIV2 260 C - Boredom

给出 n 个数a [] ,每次可以取出一个数a[]删掉,在删掉和a[]

2014-10-31 19:46:35 586

原创 POJ 3342 Party at Hali-Bula

树形dp 入门,先输入大boss名字, 接下来n-1组,输入

2014-10-31 19:24:25 484

原创 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 4272

连连看的set 小应用。。

2014-10-30 19:01:10 603

原创 Codeforces Round #275 (Div. 2)

A:在l, r中找出a, b, c,其中a, b

2014-10-29 20:17:53 351

原创 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

原创 Codeforces Round #273 (Div. 2)

A:注意是正数。。

2014-10-19 12:18:39 404

原创 Codeforces Round #272 (Div. 2)

A:由题可知范围一定是在 n/2 ~ n中的,然后

2014-10-19 12:14:50 463

原创 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

原创 CF 271 A Keyboard B Worms C Captain Marmot

A:边界不用处理,直接遍历原始数组先

2014-10-09 21:35:05 770

原创 CF 248 C. Ryouko's Memory Note

记录每个点相邻的点, 假设更新点是

2014-10-08 23:03:13 589

原创 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关注的人

提示
确定要删除当前文章?
取消 删除