自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

残阳止水

ACM算法

  • 博客(34)
  • 收藏
  • 关注

原创 TrickGCD(HDU 6053 莫比乌斯函数的反演)

TrickGCDTime Limit: 5000/2500 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 2492    Accepted Submission(s): 958Problem DescriptionYou are give

2017-07-31 20:27:13 441

原创 Puzzle(HDU 6048)

A Jigsaw puzzle contains N*M-1 pieces of jigsaws in a N rows*M columns rectangular board.Each jigsaw has a distinct number from 1 to N*M-1.Li is a naughty boy,he wants to arrange the board in his unique way.At the beginning,he picks all N*M-1 jigsaws out a

2017-07-31 16:55:32 322

原创 Funny Function(HDU 6050)

Function Fx,ysatisfies:For given integers N and M,calculate Fm,1 modulo 1e9+7.There is one integer T in the first line.The next T lines,each line includes two integers N and M .1<=T<=10000,1<=N,M<2^63.

2017-07-29 18:50:12 380

原创 Colorful Tree(HDU 6035)

There is a tree with n nodes, each of which has a type of color represented by an integer, where the color of node i is ci.The path between each two different nodes is unique, of which we define the value as the number of different colors appearing in it

2017-07-29 14:45:46 324 1

原创 Function (HDU 6038)

FunctionTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1453    Accepted Submission(s): 680Problem DescriptionYou are give

2017-07-29 08:59:39 272

原创 Maximum Sequence(hdu 6047)

Steph is extremely obsessed with “sequence problems” that are usually seen on magazines: Given the sequence 11, 23, 30, 35, what is the next number? Steph always finds them too easy for such a genius like himself until one day Klay comes up with a problem

2017-07-28 09:27:00 263

原创 Is Derek lying?(HDU 6045)

Derek and Alfia are good friends.Derek is Chinese,and Alfia is Austrian.This summer holiday,they both participate in the summer camp of Borussia Dortmund.During the summer camp,there will be fan tests at intervals.The test consists of N choice questions an

2017-07-27 19:31:18 699

原创 Regular polygon(HDU 6055)

On a two-dimensional plane, give you n integer points. Your task is to figure out how many different regular polygon these points can make.

2017-07-27 18:54:43 610

原创 2017 Multi-University Training Contest - Team 1:KazaQ's Socks(hdu 6043)

KazaQ wears socks everyday.At the beginning, he has n pairs of socks numbered from 1 to n in his closets. Every morning, he puts on a pair of socks which has the smallest number in the closets. Every evening, he puts this pair of socks in the basket.

2017-07-27 10:18:58 277

原创 2017 Multi-University Training Contest - Team 1:Add More Zero (hdu 6033)

There is a youngster known for amateur propositions concerning several mathematical hard problems.Nowadays, he is preparing a thought-provoking problem on a specific type of supercomputer which has ability to support calculations of integers between 0 an

2017-07-27 09:28:52 340

原创 2017 Multi-University Training Contest - Team 1 :Hints of sd0061(hdu 6040)

sd0061, the legend of Beihang University ACM-ICPC Team, retired last year leaving a group of noobs. Noobs have no idea how to deal with m coming contests. sd0061 has left a set of hints for them.There are n noobs in the team, the i-th of which has a rati

2017-07-26 23:22:15 462

原创 Best Reward (hdu 3613 拓展KMP)

After an uphill battle, General Li won a great victory. Now the head of state decide to reward him with honor and treasures for his great exploit. One of these treasures is a necklace made up of 26 different kinds of gemstones, and the length of the neck

2017-07-26 20:30:37 234

原创 Number Sequence(HDU 1711 KMP)

Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b[1], a[K + 1] = b[2], ...... , a[K + M - 1] = b[M]. If there are more than on

2017-07-24 16:37:34 214

原创 Schedule Problem (HDU 1534 差分约束+SPFA)

A project can be divided into several parts. Each part should be completed continuously. This means if a part should take 3 days, we should use a continuous 3 days do complete it. There are four types of constrains among these parts which are FAS, FAF, SAF

2017-07-24 14:19:38 289

原创 Legal or Not (hdu 3342 拓扑排序判断是否成环)

ACM-DIY is a large QQ group where many excellent acmers get together. It is so harmonious that just like a big family. Every day,many "holy cows" like HH, hh, AC, ZT, lcc, BF, Qinz and so on chat on-line to exchange their ideas. When someone has questions,

2017-07-23 16:18:47 321

原创 Rank of Tetris (hdu 1811 拓扑排序)

自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都知道是根据Rating从高到低来排,如果两个人具有相同的Rating,那就按这几个人的RP从高到低来排。终于,Lele要开始行动了,对N个人进行排名。为了方便起见,每个人都已经被编号,分别从0到N-1,并且编号越大,RP就越高。同时Lele从

2017-07-23 16:01:52 313

原创 逃生 (hdu 4857 拓扑排序+优先队列)

糟糕的事情发生啦,现在大家都忙着逃命。但是逃命的通道很窄,大家只能排成一行。现在有n个人,从1标号到n。同时有一些奇怪的约束条件,每个都形如:a必须在b之前。同时,社会是不平等的,这些人有的穷有的富。1号最富,2号第二富,以此类推。有钱人就贿赂负责人,所以他们有一些好处。负责人现在可以安排大家排队的顺序,由于收了好处,所以他要让1号尽量靠前,如果此时还有多种情况,就再让2号尽量靠前,如果还有多种情况,就让3号尽量靠前,以此类推。那么你就要安排大家的顺序。我们保证一定有解。

2017-07-23 15:43:19 492 1

原创 Get Luffy Out * (2-sat + 二分)

Ratish is a young man who always dreams of being a hero. One day his friend Luffy was caught by Pirate Arlong. Ratish set off at once to Arlong's island. When he got there, he found the secret place where his friend was kept, but he could not go straight i

2017-07-22 13:57:57 476

原创 2-SAT DFS暴力求最小字典序的模板(Peaceful Commission)

2-SAT DFS暴力求最小字典序的模板(Peaceful Commission)

2017-07-21 10:30:59 469

原创 HDU 3357 Stock Chase

I have to admit, the solution I proposed last year for solving the bank cash crisis didn’t solve the whole economic crisis. As it turns out, companies don’t have that much cash in the first place.They have assets which are primarily shares in other compan

2017-07-20 19:58:15 427

原创 Successor (线段树)

Sean owns a company and he is the BOSS.The other Staff has one Superior.every staff has a loyalty and ability.Some times Sean will fire one staff.Then one of the fired man’s Subordinates will replace him whose ability is higher than him and has the highest

2017-07-19 13:32:52 720

原创 Just a Hook (hdu 1698 线段树区间更新)

In the game of DotA, Pudge’s meat hook is actually the most horrible thing for most of the heroes. The hook is made up of several consecutive metallic sticks which are of the same length.

2017-07-15 17:30:01 280

原创 MooFest POJ 1990 【树状数组】

MooFestProblem DescriptionEvery year, Farmer John's N (1 <= N <= 20,000) cows attend "MooFest",a socia

2017-07-14 20:12:00 336

原创 See you~ (hdu1892 二维树状数组模板)

See you~

2017-07-14 14:52:31 384

原创 Frosh Week (hdu 3743 树状数组)

Frosh Week

2017-07-14 14:26:46 653

原创 Color the ball (hdu 1556 树状数组)

Color the ball

2017-07-14 14:19:16 249

原创 HDU 1166 敌兵布阵

敌兵布阵

2017-07-14 13:39:25 371

原创 HDU 1541 Stars

Stars

2017-07-14 11:20:06 281

原创 POJ 2155 Matrix 树状数组

POJ 2155 Matrix

2017-07-14 09:45:44 253

原创 小明系列故事——未知剩余系

小明系列故事——未知剩余系

2017-07-12 14:37:14 535

原创 Marriage is Stable

Marriage is Stable 稳定婚姻问题 hdu 1522

2017-07-01 20:26:29 338

原创 Maximum Clique

Maximum Clique hdu 1530 最大团模板(dp剪枝)

2017-07-01 19:25:44 516

原创 棋盘游戏

棋盘游戏 hdu 1281 匈牙利算法模板

2017-07-01 18:29:47 286

原创 Fire Net

Fire Net (hdu 1045)

2017-07-01 16:18:27 350

空空如也

空空如也

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

TA关注的人

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