自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Doing Homework again (贪心)

Doing Homework again Ignatius has just come back school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher gives him a deadline of handing in the homework. If Ignatius hands i...

2018-08-17 11:13:55 538

原创 Cleaning Shifts(贪心)

Cleaning ShiftsFarmer John is assigning some of his N (1 <= N <= 25,000) cows to do some cleaning chores around the barn. He always wants to have one cow working on cleaning things up and has ...

2018-08-17 10:51:58 391

原创 Crossing River (贪心)

 Crossing RiverA group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle arrangement must be arranged in order to row th...

2018-08-17 10:34:40 382

原创 Radar Installation(贪心)

 Radar InstallationAssume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installat...

2018-08-17 10:03:26 434

原创 POJ1323 Game Prediction(贪心)

Game PredictionSuppose there are M people, including you, playing a special card game. At the beginning, each player receives N cards. The pip of a card is a positive integer which is at most N*M. A...

2018-08-16 18:31:04 568

原创 Yogurt factory (贪心)

Yogurt factoryThe cows have purchased a yogurt factory that makes world-famous Yucky Yogurt. Over the next N (1 <= N <= 10,000) weeks, the price of milk and labor will fluctuate weekly such th...

2018-08-16 17:42:38 827

原创 River Hopscotch (二分+贪心)

River HopscotchEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, straigh...

2018-08-16 17:12:17 258

原创 Stages(水题)

A. Stagestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputNatasha is going to fly to Mars. She needs to build a rocket, which cons...

2018-08-11 18:02:19 224

原创 Power Strings(KMP 循环节)

Power StringsGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponenti...

2018-08-09 11:45:34 211

原创 Period (KMP 循环节)

PeriodFor each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That is, for ea...

2018-08-09 11:25:37 276

原创 Cyclic Nacklace (KMP 最小循环节)

Cyclic NacklaceCC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan left. he is too distressed and thin...

2018-08-09 09:56:39 157

原创 剪花布条

剪花布条一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。 O...

2018-08-07 10:51:39 217

原创 Oulipo(KMP)

 OulipoThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mai...

2018-08-07 10:40:01 108

原创 Number Sequence (KMP模板题)

Number SequenceGiven 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 ...

2018-08-07 10:31:02 484

原创 棋盘游戏 (匈牙利算法)

棋盘游戏小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。 所以现在Gardon想让小希来解决一个更难的问题,在保证尽量多的“车”的前提下,棋盘里有些格子是可以避开的,也就是说,不在这些...

2018-08-04 16:00:38 513

原创 Courses (匈牙利算法)

CoursesConsider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible to form a committee of exactly P student...

2018-08-04 15:28:02 297

原创 Fire Net

Fire NetSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall. A blockhouse is a small...

2018-08-04 12:00:26 582

原创 The Accomodation of Students (二分图匹配,匈牙利算法,染色法判断)

The Accomodation of StudentsThere are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B and C know each other. But this may not imply...

2018-08-04 11:11:33 217 1

空空如也

空空如也

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

TA关注的人

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