- 博客(88)
- 收藏
- 关注
原创 bootstrap 分页
bootstrap分页html代码 jquery $(function(){ $(".pagination").createPage({ totalPage:30, currPage:14, backFn:function(p){
2017-03-25 21:30:31
396
原创 Codeforces 708C 树形DP
C. Centroidstime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputTree is a connected acyclic graph. Suppose you
2016-08-25 15:59:08
705
原创 Generators
Problem G. GeneratorsInput file: generators.inOutput file: generators.outLittle Roman is studying linear congruential generators — one of the oldest and best known pseudorandomnumber generator
2016-08-25 10:50:17
556
原创 hihicoder 1251
Today is a rainy day. The temperature is apparently lower than yesterday. Winter is coming. It alwaysleaves people feeling fatigued and tired.Lee hasn’t prepared for winter yet. As he wakes up thi
2016-08-23 10:03:57
296
原创 hihoCoder 1257
In school of EECS of Peking University, there is a homework for all freshman — the contest of AIsnakes. 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
377
原创 poj 1155
DescriptionA 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
285
原创 poj 3162 Walking Race
Descriptionflymouse’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
350
原创 CF 219D Choosing Capital for Treeland (树形dp)
D. Choosing Capital for TreelandThe 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
516
原创 POJ 1741 Tree
DescriptionGive 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
222
原创 hdu 1520
Anniversary partyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9235 Accepted Submission(s): 3965Problem DescriptionThere is
2016-08-15 20:29:39
285
原创 poj 2486 apple tree(树形DP)
DescriptionWshxzt 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
468
原创 hdu 2196 Computer(树形DP)
Problem DescriptionA 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
269
原创 BZOJ 3052 带修改的树上莫队
Candyland 有一座糖果公园,公园里不仅有美丽的风景、好玩的游乐项目,还有许多免费糖果的发放点,这引来了许多贪吃的小朋友来糖果公园玩。糖果公园的结构十分奇特,它由 nn 个游览点构成,每个游览点都有一个糖果发放处,我们可以依次将游览点编号为 11 至 nn。有 n−1n−1 条双向道路连接着这些游览点,并且整个糖果公园都是连通的,即从任何一个游览点出发都可以通过这些道路到达公园里
2016-08-13 20:49:56
350
原创 spoj cot2 树上莫队
COT2 - Count on a tree II#treeYou 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
365
原创 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
282
原创 bzoj 2038 [2009国家集训队]小Z的袜子(hose)
Description作为一个生活散漫的人,小Z每天早上都要耗费很久从一堆五颜六色的袜子中找出一双来穿。终于有一天,小Z再也无法忍受这恼人的找袜子过程,于是他决定听天由命……具体来说,小Z把这N只袜子从1到N编号,然后从编号L到R(L 尽管小Z并不在意两只袜子是不是完整的一双,甚至不在意两只袜子是否一左一右,他却很在意袜子的颜色,毕竟穿两只不同色的袜子会很尴尬。你的任务便是告诉小Z
2016-08-10 11:07:30
269
原创 hdu 2243 考研路茫茫——单词情结(AC自动机+矩阵)
Problem Description背单词,始终是复习英语的重要环节。在荒废了3年大学生涯后,Lele也终于要开始背单词了。一天,Lele在某本单词书上看到了一个根据词根来背单词的方法。比如"ab",放在单词前一般表示"相反,变坏,离去"等。于是Lele想,如果背了N个词根,那这些词根到底会不会在单词里出现呢。更确切的描述是:长度不超过L,只由小写字母组成的,至少包含一个词根
2016-08-08 11:35:20
512
原创 hdu 2296 Ring(AC自动机+DP)
Problem DescriptionFor 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
258
原创 POJ 2778 DNA Sequence (AC 自动机+矩阵)
DNA SequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15064 Accepted: 5806DescriptionIt's well known that DNA Sequence is a sequence only contains
2016-08-04 21:22:48
248
原创 hdu DNA repair(AC自动机+DP)
DescriptionBiologists 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
323
原创 AC自动机模板
AC自动机主要是用于多模式串的匹配问题,按照我的理解,AC自动机就是在Tire树上实现KMP算法,由于AC自动机加入了失败指针,所以可以把他看成一个状态转移的图。给出模板#include#include#include#include#includeusing namespace std;const int maxnode=240005;const int maxn=1010
2016-08-03 11:38:14
211
原创 codeforces 55D Beautiful numbers(数位DP)
DescriptionVolodya 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
306
原创 treap的应用
Description有一个序列含有一定数量的元素,现在要求写一个程序,满足以下几个要求:【A】支持插入操作(这个序列不允许有重复元素,即是说,如果待插入的元素已经出现在这个序列中,那么请忽略此操作)【B】支持删除操作(如果此序列中不包含待删除的这个元素,则忽略此操作,否则删除这个元素)【C】查找元素x的前继元素(前继元素是指:小于x且与x最接近的元素,当然,如果x已经是序列中的
2016-07-26 16:23:56
361
1
原创 hdu 5733 (计算几何)
Problem DescriptionGiven four points ABCD, if ABCD is a tetrahedron, calculate the inscribed sphere of ABCD. InputMultiple test cases (test cases ≤100).Each test cases contains a
2016-07-24 21:33:23
278
原创 hdu 5726 GCD(线段树+预处理)
Problem DescriptionGive you a sequence of N(N≤100,000) integers : a1,...,an(0 InputThe 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
324
原创 hdu 5724(博弈论+状态压缩)
ChessTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1044 Accepted Submission(s): 451Problem DescriptionAlice and Bob are pla
2016-07-21 16:40:07
374
原创 hdu 5723 Abandoned country
Abandoned countryTime Limit: 8000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2586 Accepted Submission(s): 643Problem DescriptionAn abando
2016-07-21 11:24:09
263
原创 Codeforces Round #363 D Fix a Tree(并查集)
D. Fix a Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tree is an undirected connected graph witho
2016-07-20 19:46:53
896
原创 hdu 4277 USACO ORZ
迎参加2016多校联合训练的同学们~ USACO ORZTime Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4499 Accepted Submission(s): 1486Problem
2016-07-19 12:15:27
249
原创 Beautiful Numbers
Beautiful NumbersTime Limit: 2000MS Memory Limit: 262144KB 64bit IO Format:Submit StatusDescriptionVitaly is a very weird man. He's got two favorite digits a and
2016-07-18 12:55:17
735
原创 hdu 3397 Sequence operation(线段树区间覆盖,区间合并)
Problem Descriptionlxhgww 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
348
原创 hdu 3833 YY's new problem
YY's new problemTime Limit: 12000/4000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 5443 Accepted Submission(s): 1530Problem DescriptionGiven a
2016-05-07 20:51:32
379
原创 poj 1840 Eqs
EqsTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 15037 Accepted: 7372DescriptionConsider equations having the following form: a1x13+ a2x23+ a3x33+ a
2016-05-07 15:26:47
976
原创 poj 2002 Square
SquaresTime Limit: 3500MS Memory Limit: 65536KTotal Submissions: 18509 Accepted: 7131DescriptionA square is a 4-sided polygon whose sides have equal length and ad
2016-05-07 11:31:45
481
原创 计蒜客 腾讯手机地图
腾讯手机地图的定位功能用到了用户手机的多种信号,这其中有的信号的作用范围近,有的信号作用的范围则远一些。有的信号相对于用户在不同的方位强度是不同的,有的则是在任何一个方向上信号强度都一致的。已知用户面向北方拿着自己的手机,在不同方位的各种信号覆盖区域可以被抽象成以用户为圆心的一系列扇形。已知每个扇形的半径 r,和每个扇形的两条边相对于正东方向的夹角度数。每个信号覆盖区域抽象出的扇形都可以通过从
2016-04-24 15:19:30
374
原创 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
588
原创 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
508
原创 hdu 1712 ACboy needs your help
Problem DescriptionACboy 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
195
原创 hdu 2587 Mirror and Light
Problem DescriptionThe 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
285
原创 hdu 1247 Hat’s Words
Problem DescriptionA 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
275
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人