自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(34)
  • 资源 (6)
  • 收藏
  • 关注

原创 c++11之unique_ptr

下面的内容转自:智能指针 我们知道auto_ptr通过复制构造或者通过=赋值后,原来的auto_ptr对象就报废了.所有权转移到新的对象中去了.而通过shared_ptr可以让多个智能指针对象同时拥有某一块内存的访问权.但假如我们不希望多个内存块被多个智能指针对象共享,同时又不会像auto_ptr那样不知不觉的就让原来的auto_ptr对象失效,可咋整呢?这个时候就要使用unique_ptr了,顾

2015-07-31 10:17:47 354

原创 2015 Multi-University Training Contest 4 (hdu5338 ZZX and Permutations)线段树(好)

ZZX and PermutationsProblem DescriptionZZX likes permutations.ZZX knows that a permutation can be decomposed into disjoint cycles(see https://en.wikipedia.org/wiki/Permutation#Cycle_notation). For exam

2015-07-30 22:25:24 425

原创 2015 Multi-University Training Contest 4 (hdu 5335、5336)模拟

XYZ and DropsProblem DescriptionXYZ is playing an interesting game called “drops”. It is played on a r∗c grid. Each grid cell is either empty, or occupied by a waterdrop. Each waterdrop has a property

2015-07-30 17:21:44 568

原创 2015 Multi-University Training Contest 3(hdu 5316、5317、5319、5323、5325、5326)线段树+数学+yy+矩阵快速幂

MagicianProblem DescriptionFantasy magicians usually gain their ability through one of three usual methods: possessing it as an innate talent, gaining it through study and practice, or receiving it fro

2015-07-28 18:28:50 676

转载 hdu 5297 - Y sequence( 2015 Multi-University Training Contest 1)容斥原理

Y sequenceProblem DescriptionYellowstar likes integers so much that he listed all positive integers in ascending order,but he hates those numbers which can be written as a^b (a, b are positive integers

2015-07-27 23:35:23 453

原创 hdu 5296 - Annoying problem(2015 Multi-University Training Contest 1 )LCA

Annoying problem Time Limit: 16000/8000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 865 Accepted Submission(s): 286Problem Description Coco has a tree, whos

2015-07-27 21:47:06 418

原创 2008 Asia Regional Beijing (网络流+树状数组+贪心)hdu2485 - 2494

Destroying the bus stationsProblem DescriptionGabiluso is one of the greatest spies in his country. Now he’s trying to complete an “impossible” mission —– to make it slow for the army of City Colugu to

2015-07-27 16:54:28 449

原创 Dijkstra最短路模板(lrj)

感觉还是lrj的Dijkstra模板高端一些,准备一份struct Edge{ int from,to,dist; Edge(int f=0,int t=0,int d=0):from(f),to(t),dist(d){}};struct HeapNode//优先队列节点{ int d,u; HeapNode(int _d=0,int _u=0):d(_d),

2015-07-27 11:03:59 456

原创 hdu 5294 - Tricks Device(2015 Multi-University Training Contest 1 )最短路+网络流

Tricks DeviceProblem DescriptionInnocent Wu follows Dumb Zhang into a ancient tomb. Innocent Wu’s at the entrance of the tomb while Dumb Zhang’s at the end of it. The tomb is made up of many chambers,

2015-07-27 10:47:58 419

原创 hdu 5288 - OO’s Sequence 数学

OO’s SequenceProblem Description OO has got a array A of size n ,defined a function f(l,r) represent the number of i (l<=i<=r) , that there’s no j(l<=j<=r,j<>i) satisfy ai mod aj=0,now OO want to know

2015-07-26 20:49:47 460

原创 hdu 5289 - Assignment(2015 Multi-University Training Contest 1 )单调队列+RMQ+树状数组

AssignmentProblem DescriptionTom owns a company and he is the boss. There are n staffs which are numbered from 1 to n in this company, and every staff has a ability. Now, Tom is going to assign a speci

2015-07-26 20:05:25 518

原创 Codeforces Round #313 (Div. 2)E. Gerald and Giant Chess(Lucas定理+dp)

E. Gerald and Giant ChessGiant chess is quite common in Geraldion. We will not delve into the rules of the game, we’ll just say that the game takes place on an h × w field, and it is painted in two col

2015-07-25 16:12:28 678

原创 Codeforces Round #313 (Div. 2)D. Equivalent Strings(字符串)

D. Equivalent StringsToday on a lecture about strings Gerald learned a new definition of string equivalency. Two strings a and b of equal length are called equivalent in one of the two cases:They are e

2015-07-25 11:36:23 466

原创 最近点对

#include #include #include #include #include #include #include #include #include #include #include using namespace std; const in

2015-07-20 10:39:38 393

原创 BestCoder Round #47 ($)(hdu5280 - 5282)dp最长公共子序列变形

Senior’s Array某天学姐姐得到了一个数组A,在这个数组的所有非空区间中,她找出了一个区间和最大的,并把这个区间和定义为这个数组的美丽值。但是她觉得这个数组不够美,于是决定修理一下这个数组。学姐姐将会进行一次操作,把原数组中的某个数修改为P(必须修改)。最后她想使得修改后的数组尽可能美丽。请你帮助她计算经过修理后,这个数组的美丽值最大能是多少?输入描述第一行包含一个整数T,表示测试数据组数

2015-07-12 17:47:44 593

原创 快速排序

#include<bits/stdc++.h>using namespace std;int a[100];int N;void QuickSort(int l,int r){ if(l<r) { int s=a[l]; int i=l,j=r+1; while(true) { whil

2015-07-12 14:41:33 364

原创 hdu 4495 - Rectangle(hash+二分+dp)

Rectangle Time Limit: 10000/10000 MS (Java/Others) Memory Limit: 65535/102400 K (Java/Others) Total Submission(s): 344 Accepted Submission(s): 100Problem Description Given a rectangle which co

2015-07-11 22:28:37 590

原创 2013 ACM-ICPC吉林通化全国邀请赛(hdu 4493 - 4599)(并查集+dp+数学+判奇环+差分约束)

D-City Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others) Total Submission(s): 2437 Accepted Submission(s): 859Problem Description Luxer is a really bad guy. He d

2015-07-11 16:49:22 1122

原创 hdu 5045 - Contest(2014 ACM/ICPC Asia Regional Shanghai Online )概率dp

Contest Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 974 Accepted Submission(s): 416Problem Description In the ACM International Colleg

2015-07-10 11:24:41 507

原创 2014上海全国邀请赛(hdu 5090 - 5099)dp+线段树+拓扑排序+bfs(状态压缩)

Game with Pearls Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1431 Accepted Submission(s): 527Problem Description Tom and Jerry are pla

2015-07-10 10:12:43 1151

原创 UVAlive - 5792 Diccionário Portuñol (Trie)

转自:这里写链接内容 题意:有两个字符串集合,从第一个集合中取某个串的非空前缀,从第二个集合中取某个串的非空后缀,拼接成一个串,问有多少个不同的新串。 思路:首先把第一个集合中的串加入到Trie中,然后就可以枚举前缀了,然后就是统计后缀,麻烦的是可能出现重复的。当我们按长度枚举前缀的时候,可以考虑如果后缀的前缀出现在前缀的后继中,那便不用考虑,后面总会统计到。这样的话,其实只要比较第一个字母。如

2015-07-09 11:41:42 984

原创 hdu 4760 - Good Firewall(Trie)

Good FirewallTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 663 Accepted Submission(s): 177Problem Description Professor X is an expert in

2015-07-08 23:30:42 496

原创 hdu 4758 - Walk Through Squares(AC自动机+DP)现场赛

Walk Through SquaresTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 1046    Accepted Submission(s): 318Problem Description  On

2015-07-08 15:26:15 393

原创 hdu - 4511 小明系列故事——女友的考验(AC自动机+DP)

小明系列故事——女友的考验Time Limit: 500/200 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 910 Accepted Submission(s): 207Problem Description   终于放寒假了,小明要和女朋友一起去看电影。这天,女朋友

2015-07-08 14:37:00 653

原创 ZOJ - 3494 BCD Code(AC自动机+数位DP)

BCD Code Time Limit: 5 Seconds Memory Limit: 65536 KBBinary-coded decimal (BCD) is an encoding for decimal numbers in which each digit is represented by its own binary sequence. To encode a decim

2015-07-08 11:47:59 634

原创 Codeforces Round #157 (Div. 1)B. Little Elephant and Elections 数位dp好

B. Little Elephant and ElectionsThere have recently been elections in the zoo. Overall there were 7 main political parties: one of them is the Little Elephant Political Party, 6 other parties have less

2015-07-07 20:52:35 694

原创 codeforces215 E. Periodical Numbers(数位dp)

E. Periodical Numbers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard outputA non-empty string s is called binary, if it consists only of

2015-07-07 19:16:45 985 1

原创 Ural - 1057. Amount of Degrees

1057. Amount of DegreesCreate a code to determine the amount of integers, lying in the set [X;Y] and being a sum of exactly K different integer degrees of B. Example. Let X=15, Y=20, K=2, B=2. By this

2015-07-07 12:01:22 537

原创 hdu 4352 - XHXJ's LIS (数位dp)多校联合

XHXJ’s LISProblem Descriptiondefine xhxj (Xin Hang senior sister(学姐)) If you do not know xhxj, then carefully reading the entire description is very important. As the strongest fighting force in UEST

2015-07-06 22:16:36 697

原创 hdu 3886 - Final Kichiku “Lanlanshu”(数位dp)多校联合

Final Kichiku “Lanlanshu”Problem Description During 2010 summer training, temperlisyer often does problem like this: “Consider a decimal integer as sequence of digits {D0, D1 … Dn-1} (D0 > 0), if exi

2015-07-06 21:03:43 773

原创 hdu 4507 - 吉哥系列故事——恨7不成妻(数位dp)

吉哥系列故事——恨7不成妻Problem Description   单身!   依然单身!   吉哥依然单身!   DS级码农吉哥依然单身!   所以,他生平最恨情人节,不管是214还是77,他都讨厌!      吉哥观察了214和77这两个数,发现:   2+1+4=7   7+7=7*2   77=7*11   最终,他发现原来这一切归根到底都是因为和7有关!所以,他现在

2015-07-06 19:18:55 644

原创 hdu5274 - Dylans loves tree(树链剖分)

Dylans loves treeAccepts: 37 Submissions: 262 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) 问题描述Dylans有一棵N个点的树。每个点有点权。树上节点标号为1∼N。 他得到了Q个询问,形式如下: ①0 x y:把第x个点的

2015-07-06 15:10:31 668

原创 Codeforces Round #311 (Div. 2)判环+Trie 好

C. Arthur and TableArthur has bought a beautiful big table into his new flat. When he came home, Arthur noticed that the new table is unstable.In total the table Arthur bought has n legs, the length of

2015-07-05 11:12:38 425

原创 Codeforces Round #310 (Div. 1)B,C,D(set+线段树)

B. Case of FugitiveAndrewid the Android is a galaxy-famous detective. He is now chasing a criminal hiding on the planet Oxa-5, the planet almost fully covered with water.The only dry land there is an a

2015-07-04 11:19:04 1052

高效awk编程

awk是一个强大的文本分析工具,相对于grep的查找,sed的编辑,awk在其对数据分析并生成报告时,显得尤为强大。简单来说awk就是把文件逐行的读入,以空格为默认分隔符将每行切片,切开的部分再进行各种分析处理。 awk有3个不同版本: awk、nawk和gawk,未作特别说明,一般指gawk,gawk 是 AWK 的 GNU 版本。 awk其名称得自于它的创始人 Alfred Aho 、Peter Weinberger 和 Brian Kernighan 姓氏的首个字母。实际上 AWK 的确拥有自己的语言: AWK 程序设计语言 , 三位创建者已将它正式定义为“样式扫描和处理语言”。它允许您创建简短的程序,这些程序读取输入文件、为数据排序、处理数据、对输入执行计算以及生成报表,还有无数其他的功能。

2018-06-03

hadoop-eclipse-plugin-2.7.2.jar

2016-03-19

空空如也

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

TA关注的人

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