自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 bootstrap 分页

bootstrap分页 html代码 jquery $(function(){ $(".pagination").createPage({ totalPage:30, currPage:14, backFn:function(p){

2017-03-25 21:30:31 361

原创 Codeforces 708C 树形DP

C. Centroids time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output Tree is a connected acyclic graph. Suppose you

2016-08-25 15:59:08 665

原创 Generators

Problem G. Generators Input file: generators.in Output file: generators.out Little Roman is studying linear congruential generators — one of the oldest and best known pseudorandom number generator

2016-08-25 10:50:17 504

原创 hihicoder 1251

Today is a rainy day. The temperature is apparently lower than yesterday. Winter is coming. It always leaves people feeling fatigued and tired. Lee hasn’t prepared for winter yet. As he wakes up thi

2016-08-23 10:03:57 260

原创 hihoCoder 1257

In school of EECS of Peking University, there is a homework for all freshman — the contest of AI snakes. This contest is ended today. Bacchus has got a very good result, so he decides to make a carpe

2016-08-22 17:05:31 341

原创 poj 1155

Description A TV-network plans to broadcast an important football match. Their network of transmitters and users can be represented as a tree. The root of the tree is a transmitter that emits the foo

2016-08-20 10:48:34 243

原创 poj 3162 Walking Race

Description flymouse’s sister wc is very capable at sports and her favorite event is walking race. Chasing after the championship in an important competition, she comes to a training center to at

2016-08-18 15:46:45 317

原创 CF 219D Choosing Capital for Treeland (树形dp)

D. Choosing Capital for Treeland The country Treeland consists of n cities, some pairs of them are connected with unidirectional roads. Overall there are n - 1 roads in the country. We know that

2016-08-17 20:35:32 485

原创 POJ 1741 Tree

Description Give a tree with n vertices,each edge has a length(positive integer less than 1001).  Define dist(u,v)=The min distance between node u and v.  Give an integer k,for every pair (u,v) o

2016-08-17 11:16:03 193

原创 hdu 1520

Anniversary party Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9235    Accepted Submission(s): 3965 Problem Description There is

2016-08-15 20:29:39 248

原创 poj 2486 apple tree(树形DP)

Description Wshxzt is a lovely girl. She likes apple very much. One day HX takes her to an apple tree. There are N nodes in the tree. Each node has an amount of apples. Wshxzt starts her happy trip

2016-08-15 19:51:28 429

原创 hdu 2196 Computer(树形DP)

Problem Description A school bought the first computer some time ago(so this computer's id is 1). During the recent years the school bought N-1 new computers. Each new computer was connected to one

2016-08-15 14:59:54 240

原创 BZOJ 3052 带修改的树上莫队

Candyland 有一座糖果公园,公园里不仅有美丽的风景、好玩的游乐项目,还有许多免费糖果的发放点,这引来了许多贪吃的小朋友来糖果公园玩。 糖果公园的结构十分奇特,它由 nn 个游览点构成,每个游览点都有一个糖果发放处,我们可以依次将游览点编号为 11 至 nn。有 n−1n−1 条双向道路连接着这些游览点,并且整个糖果公园都是连通的,即从任何一个游览点出发都可以通过这些道路到达公园里

2016-08-13 20:49:56 308

原创 spoj cot2 树上莫队

COT2 - Count on a tree II #tree You are given a tree with N nodes. The tree nodes are numbered from 1 to N. Each node has an integer weight. We will ask you to perform the following ope

2016-08-11 20:17:27 332

原创 hdu 5213

问题描述 wld有n个数(a1...an) 保证对于任意$1 \leq i \leq n,1 \leq ai \leq n$ wld有一个常数k保证2 \leq k\leq 2*n2≤k≤2∗n 为了消除歧义保证k为奇数 他有mm个询问 每个询问有参数l1,r1,l2,r2l1,r1,l2,r2 保证(1 \leq l1\leq r1 (1≤l1≤r1l2≤r2≤n) 对于每个

2016-08-10 19:46:26 248

原创 bzoj 2038 [2009国家集训队]小Z的袜子(hose)

Description 作为一个生活散漫的人,小Z每天早上都要耗费很久从一堆五颜六色的袜子中找出一双来穿。终于有一天,小Z再也无法忍受这恼人的找袜子过程,于是他决定听天由命…… 具体来说,小Z把这N只袜子从1到N编号,然后从编号L到R(L 尽管小Z并不在意两只袜子是不是完整的一双,甚至不在意两只袜子是否一左一右,他却很在意袜子的颜色,毕竟穿两只不同色的袜子会很尴尬。 你的任务便是告诉小Z

2016-08-10 11:07:30 241

原创 hdu 2243 考研路茫茫——单词情结(AC自动机+矩阵)

Problem Description 背单词,始终是复习英语的重要环节。在荒废了3年大学生涯后,Lele也终于要开始背单词了。 一天,Lele在某本单词书上看到了一个根据词根来背单词的方法。比如"ab",放在单词前一般表示"相反,变坏,离去"等。 于是Lele想,如果背了N个词根,那这些词根到底会不会在单词里出现呢。更确切的描述是:长度不超过L,只由小写字母组成的,至少包含一个词根

2016-08-08 11:35:20 480

原创 hdu 2296 Ring(AC自动机+DP)

Problem Description For the hope of a forever love, Steven is planning to send a ring to Jane with a romantic string engraved on. The string's length should not exceed N. The careful Steven knows J

2016-08-06 16:31:33 222

原创 POJ 2778 DNA Sequence (AC 自动机+矩阵)

DNA Sequence Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 15064   Accepted: 5806 Description It's well known that DNA Sequence is a sequence only contains

2016-08-04 21:22:48 206

原创 hdu DNA repair(AC自动机+DP)

Description Biologists finally invent techniques of repairing DNA that contains segments causing kinds of inherited diseases. For the sake of  simplicity, a DNA is represented as a string containi

2016-08-03 14:23:47 274

原创 AC自动机模板

AC自动机主要是用于多模式串的匹配问题,按照我的理解,AC自动机就是在Tire树上实现KMP算法,由于AC自动机加入了失败指针,所以可以把他看成一个状态转移的图。 给出模板 #include #include #include #include #include using namespace std; const int maxnode=240005; const int maxn=1010

2016-08-03 11:38:14 189

原创 codeforces 55D Beautiful numbers(数位DP)

Description Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible by each of its nonzero digits. We will

2016-07-28 16:54:43 279

原创 treap的应用

Description 有一个序列含有一定数量的元素,现在要求写一个程序,满足以下几个要求: 【A】支持插入操作(这个序列不允许有重复元素,即是说,如果待插入的元素已经出现在这个序列中,那么请忽略此操作) 【B】支持删除操作(如果此序列中不包含待删除的这个元素,则忽略此操作,否则删除这个元素) 【C】查找元素x的前继元素(前继元素是指:小于x且与x最接近的元素,当然,如果x已经是序列中的

2016-07-26 16:23:56 320 1

原创 hdu 5733 (计算几何)

Problem Description Given four points ABCD, if ABCD is a tetrahedron, calculate the inscribed sphere of ABCD.   Input Multiple test cases (test cases ≤100). Each test cases contains a

2016-07-24 21:33:23 255

原创 hdu 5726 GCD(线段树+预处理)

Problem Description Give you a sequence of N(N≤100,000) integers : a1,...,an(0   Input The first line of input contains a number T, which stands for the number of test cases you need to solve.

2016-07-24 20:20:53 298

原创 hdu 5724(博弈论+状态压缩)

Chess Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1044    Accepted Submission(s): 451 Problem Description Alice and Bob are pla

2016-07-21 16:40:07 346

原创 hdu 5723 Abandoned country

Abandoned country Time Limit: 8000/4000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 2586    Accepted Submission(s): 643 Problem Description An abando

2016-07-21 11:24:09 236

原创 Codeforces Round #363 D Fix a Tree(并查集)

D. Fix a Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A tree is an undirected connected graph witho

2016-07-20 19:46:53 852

原创 hdu 4277 USACO ORZ

迎参加2016多校联合训练的同学们~  USACO ORZ Time Limit: 5000/1500 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4499    Accepted Submission(s): 1486 Problem

2016-07-19 12:15:27 216

原创 Beautiful Numbers

Beautiful Numbers Time Limit: 2000MS   Memory Limit: 262144KB   64bit IO Format: Submit Status Description Vitaly is a very weird man. He's got two favorite digits a and 

2016-07-18 12:55:17 690

原创 hdu 3397 Sequence operation(线段树区间覆盖,区间合并)

Problem Description lxhgww got a sequence contains n characters which are all '0's or '1's. We have five operations here: Change operations: 0 a b change all characters into '0's in [a , b] 1 a

2016-05-28 16:10:45 322

原创 hdu 3833 YY's new problem

YY's new problem Time Limit: 12000/4000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 5443    Accepted Submission(s): 1530 Problem Description Given a

2016-05-07 20:51:32 338

原创 poj 1840 Eqs

Eqs Time Limit: 5000MS   Memory Limit: 65536K Total Submissions: 15037   Accepted: 7372 Description Consider equations having the following form:  a1x13+ a2x23+ a3x33+ a

2016-05-07 15:26:47 940

原创 poj 2002 Square

Squares Time Limit: 3500MS   Memory Limit: 65536K Total Submissions: 18509   Accepted: 7131 Description A square is a 4-sided polygon whose sides have equal length and ad

2016-05-07 11:31:45 450

原创 计蒜客 腾讯手机地图

腾讯手机地图的定位功能用到了用户手机的多种信号,这其中有的信号的作用范围近,有的信号作用的范围则远一些。有的信号相对于用户在不同的方位强度是不同的,有的则是在任何一个方向上信号强度都一致的。 已知用户面向北方拿着自己的手机,在不同方位的各种信号覆盖区域可以被抽象成以用户为圆心的一系列扇形。已知每个扇形的半径 r,和每个扇形的两条边相对于正东方向的夹角度数。每个信号覆盖区域抽象出的扇形都可以通过从

2016-04-24 15:19:30 333

原创 hdu 4773 圆的反演变换

Problem of Apollonius                                                                           Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)                

2016-04-21 15:13:03 532

原创 hdu 5667 sequence

Problem Description     Holion August will eat every thing he has found.     Now there are many foods,but he does not want to eat all of them at once,so he find a sequence. fn=⎧⎩⎨⎪⎪1,ab,a

2016-04-17 13:10:13 483

原创 hdu 1712 ACboy needs your help

Problem Description ACboy has N courses this term, and he plans to spend at most M days on study.Of course,the profit he will gain from different course depending on the days he spend on it.How to

2016-04-07 20:57:02 167

原创 hdu 2587 Mirror and Light

Problem Description The light travels in a straight line and always goes in the minimal path between two points, are the basic laws of optics. Now, our problem is that, if a branch of light goes

2016-04-07 16:59:00 255

原创 hdu 1247 Hat’s Words

Problem Description A hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary. You are to find all the hat’s words in a dictionary.  

2016-04-05 19:13:37 247

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

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