自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 博客搬迁

博客将搬迁至handsomehow.com

2017-03-21 20:13:45 503

原创 Codeforces 754 D Fedor and coupons

D. Fedor and couponstime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAll our characters have hobbies. The s

2017-01-07 11:32:27 902

原创 codeforces 743 D. Chloe and pleasant prizes(DFS)

D. Chloe and pleasant prizestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGenerous sponsors of the olymp

2016-12-15 14:04:13 653

原创 codeforces 743 C. Vladik and fractions(构造)

C. Vladik and fractionstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVladik and Chloe decided to determin

2016-12-15 14:00:03 728

原创 codeforces 743 B Chloe and the sequence(递归)

B. Chloe and the sequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputChloe, the same as Vladik, is a co

2016-12-15 13:56:35 449

原创 codeforces 743 A Vladik and flights(水题)

A. Vladik and flightstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVladik is a competitive programmer. T

2016-12-15 13:54:41 561

原创 HDU5880 Family View(AC自动机)

链接:http://acm.hdu.edu.cn/showproblem.php?pid=5880题意:给定N个串,一个长文本,把那N个串在长文本里出现的部分用×代替。思路:把N个串放到AC自动机上然后在结点标记上串长,接着把长文本放到自动机上去匹配,匹配到了就替换掉。至于替换的方法,不用暴力的去修改,只要同类似括号匹配的方式打上标记就好了。要注意2种情况的处理1:   N个串种有

2016-10-10 18:30:36 480

原创 HDU 5573 Binary Tree 构造

链接:http://acm.hdu.edu.cn/showproblem.php?pid=5573思路:首先,我们要知道,用1,2,4,...2^(n-1)能构造出所有的1~2^n-1的数,所以我们一直走最左边的路就好了,当然,根据奇偶性要在最后一步调整下.然后我们在第i层选正负怎么办呢,我们就假设是正的,那么我们就要用1,2...2^(i-1)构造出n-2^i,如果构造不出来,那就取负的

2016-10-05 17:28:16 376

原创 HDU5556 Land of Farms 最大独立集

链接:http://acm.hdu.edu.cn/showproblem.php?pid=5556思路:直接枚举祖先的选不选,然后把选上的附近的删掉,然后剩下的点按做最大独立集.祖先那边选了x个,剩下的没被删掉的点共n个,把x+y是奇数的放一边,偶数的放另一边,匹配数是m,那么结果就是x+n-m。代码:#include #include #include #inclu

2016-10-05 17:22:25 407

原创 codeforces 709 D Recover the String (构造)

D. Recover the Stringtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputFor each string s consisting of charac

2016-09-06 17:09:53 683

原创 CodeForces 369 div2 E. ZS and The Birthday Paradox 数论

E. ZS and The Birthday Paradoxtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputZS the Coder has recently fo

2016-08-30 18:52:14 621

原创 CodeForces 369 div2 D Directed Roads 图论 数论

D. Directed Roadstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputZS the Coder and Chris the Baboon has exp

2016-08-30 18:50:59 491

原创 CodeForces 369 div2 C Coloring Trees DP

C. Coloring Treestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputZS the Coder and Chris the Baboon has arr

2016-08-30 00:47:51 554

原创 CodeForces 367E Working routine 十字链表

E. Working routinetime limit per test2.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasiliy finally got to work, where the

2016-08-12 22:45:10 994

原创 CodeForces 367D Vasiliy's Multiset Trie树

D. Vasiliy's Multisettime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAuthor has gone out of the stories ab

2016-08-12 22:36:52 538

原创 CodeForces 367C Hard problem DP

C. Hard problemtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasiliy is fond of solving different tasks.

2016-08-12 22:33:40 744

原创 HDU5794 A Simple Chess

A Simple ChessTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2015    Accepted Submission(s): 545Problem DescriptionThere is a n

2016-08-11 23:14:59 574

原创 HDU5831 Rikka with Parenthesis II

Rikka with Parenthesis IITime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 60    Accepted Submission(s): 48Problem DescriptionAs w

2016-08-11 19:07:37 595

原创 HDU5826 physics

physicsTime Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 54    Accepted Submission(s): 36Problem DescriptionThere are n balls on a

2016-08-11 18:58:05 367

原创 POJ087 A Plug for UNIX (最大流)

A Plug for UNIXTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 15962 Accepted: 5464DescriptionYou are in charge of setting up the press room for the i

2016-07-31 14:55:01 347

原创 HDU5270Wool (区间扫描)

WoolTime Limit: 8000/4000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 918    Accepted Submission(s): 270Problem DescriptionAt dawn, Venus sets a

2016-07-29 13:09:37 553

原创 CF363Ddiv2 D Fix a Tree

晚上写残了,来补一下。D. Fix a Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tree is an undir

2016-07-20 10:05:47 529

原创 树状DP

今天我们来学一下树状DP树状DP 一听就明白,树上的DP,父亲的状态要根据儿子的状态来确定,而树这种东西呢,一般DFS一遍就可以了。先来两个题吧。Anniversary partyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6456 Accepted:

2016-07-19 20:35:36 2653

原创 HDU1026 Ignatius and the Princess I(优先队列+BFS)

Ignatius and the Princess ITime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 16500    Accepted Submission(s): 5248Special JudgeProblem

2016-06-04 00:24:23 404

原创 POJ3660 Cow Contest (传递闭包)

Cow ContestTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9308 Accepted: 5240DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are partici

2016-05-20 12:43:33 573

原创 HDU2067小兔的棋盘

小兔的棋盘Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8981    Accepted Submission(s): 4662Problem Description小兔的叔叔从外面旅游回来给她带来了一个礼

2016-05-19 23:44:23 1017

原创 [LeetCODE] Best Time to Buy and Sell Stock I II III IV V

I:Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the s

2016-05-15 20:46:50 390

原创 2016百度之星资格赛

Problem A  Accepts: 1662  Submissions: 11595 Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 65536/65536 K (Java/Others)Problem Description度熊手上有一本字典存储了大量的单词,有一次,他

2016-05-15 20:22:07 2430

原创 HDU1024 Max Sum Plus Plus

Max Sum Plus PlusTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 24256    Accepted Submission(s): 8313Problem DescriptionNow I t

2016-05-13 15:27:23 336

原创 Recycling Bottles

Recycling Bottlestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt was recycling day in Kekoland. To cele

2016-05-12 15:03:00 660

原创 欧拉函数

单个数的欧拉函数以及线性筛

2016-05-05 21:41:38 7967

原创 How many primes

How many primesTime Limit:1000MS  Memory Limit:65536KTotal Submit:396 Accepted:15DescriptionA prime number (or a prime) is a natural number greater than 1 that has no positive divisors other t

2016-04-26 15:53:19 682

原创 Piece of Cake

Piece of CakeTime Limit:1000MS  Memory Limit:65536KTotal Submit:69 Accepted:13DescriptionThe annual neonatal trials will start next week, at the same time, all old guys of the ACM teams want t

2016-04-26 13:33:56 868

原创 Juju's lessons

Juju's lessonsTime Limit:1000MS  Memory Limit:65536KTotal Submit:209 Accepted:40DescriptionJuju is a child who enjoys learning. she has two majors and many courses have time conflict.As a chil

2016-04-26 13:25:25 560

原创 Ranking Problem

Ranking ProblemTime Limit:1000MS  Memory Limit:65536KTotal Submit:80 Accepted:14DescriptionIf you are a LOLer, then you must be very familiar with LPL league. In the spring of 2016 LPL league

2016-04-26 13:16:49 956

原创 Alpha and Beta

Alpha and BetaTime Limit:1000MS  Memory Limit:65536KTotal Submit:491 Accepted:62DescriptionAlpha and Beta are best friends and make company with each other all the time. There is a time when

2016-04-26 13:09:20 696

原创 Ctrl + H

Ctrl + HTime Limit:1000MS  Memory Limit:65536KTotal Submit:345 Accepted:84DescriptionAs we know, ’Ctrl + H’ is shortcut key of ‘replace’. In the problem, we define the ‘replace’ as replacing o

2016-04-26 13:00:04 493

原创 Yeahpeng's inequality

Yeahpeng's inequalityTime Limit:3000MS  Memory Limit:65536KTotal Submit:35 Accepted:5DescriptionYeahpeng is not good at inequality. Unfortunately, there are many inequalities in his homework a

2016-04-26 12:56:01 478

原创 HDU Labyrinth DP

LabyrinthTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 701    Accepted Submission(s): 316Problem Description度度熊是一只喜欢探险的熊,一次偶然落

2016-04-19 18:59:29 506

原创 UESTC 1137 邱老师选妹子

邱老师选妹子Time Limit: 3000/1000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others)Submit Status邱老师长得帅这是人尽皆知,于是追他的妹子就会很多。但是你知道,邱老师是一个很专一的人,所以他心里面只能有一个人。于是他决定从追他的众多妹子里挑选

2016-04-15 11:05:19 546

空空如也

空空如也

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

TA关注的人

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