- 博客(52)
- 收藏
- 关注
原创 【HDU - 1520 Cupcake】 树形DP
A - CupcakeThere is going to be a party to celebrate the 80-th Anniversary of the Ural State University. The University has a hierarchical structure of employees. It means that the superviso
2017-08-30 14:10:29
377
原创 【HDU - 2112 HDU Today】 最短路 dijkstra
D - HDU Today经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫妇也退居了二线,并在风景秀美的诸暨市浬浦镇陶姚村买了个房子,开始安度晚年了。 这样住了一段时间,徐总对当地的交通还是不太了解。有时很郁闷,想去一个地方又不知道应该乘什么
2017-08-30 11:59:31
348
原创 【HDU - 1385 Minimum Transport Cost】 floyd打印路径
C - Minimum Transport CostThese are N cities in Spring country. Between each pair of cities there may be one transportation track or none. Now there is some cargo that should be de
2017-08-29 15:45:07
402
原创 【HDU - 2066 一个人的旅行】 最短路 dijkstra,spfa
B - 一个人的旅行虽然草儿是个路痴(就是在杭电待了一年多,居然还会在校园里迷路的人,汗~),但是草儿仍然很喜欢旅行,因为在旅途中 会遇见很多人(白马王子,^0^),很多事,还能丰富自己的阅历,还可以看美丽的风景……草儿想去很多地方,她想要去东京铁塔看夜景,去威尼斯看电影,去阳明山上看海芋,去纽约纯粹看雪景,去巴黎喝咖啡写信,去北京探望孟姜女……眼看寒假就快
2017-08-29 13:40:32
374
原创 【HDU - 2544 最短路】 最短路 dijkstra,spfa
A - 最短路在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店到赛场的路线,你可以帮助他们吗? Input输入包括多组数据。每组数据第一行是两个整数N、M(N输入保证至少存在1条商店到赛场的路线。 Output对
2017-08-29 11:41:48
313
原创 【Gym - 101498G Super Subarray】 前缀和
G - Super SubarrayIn this problem, subarray is defined as non-empty sequence of consecutive elements.We define a subarray as Super Subarray if the summation of all elements i
2017-08-28 11:14:15
1270
原创 【Gym - 101498H Palindrome Number】 思维
H - Palindrome NumberA palindrome number is a number that can be read the same way from left to right and from right to left. For example: 961169, 111, 554455 are palindromes,
2017-08-26 21:30:19
1270
原创 【Gym - 101350G Snake Rana】 容斥原理
G - Snake RanaOld Macdonald wants to build a new hen house for his hens. He buys a new rectangular area of size N by M. The night before he builds the hen house, snake Rana devises an ev
2017-08-26 20:34:51
704
原创 【Gym - 101350M Make Cents?】 STL - map
M - Make Cents?Every year, an elephant qualifies to the Arab Collegiate Programming Competition. He graduated this year, but that’s irrelephant. What’s important is that the location of
2017-08-26 20:30:25
381
原创 【CodeForces - 758C Unfair Poll】 暴力 + 模拟
D - Unfair PollOn the Literature lesson Sergei noticed an awful injustice, it seems that some students are asked more often than others.Seating in the class looks like a rectangle, where n
2017-08-25 11:41:58
345
原创 【CodeForces - 754D Fedor and coupons】 贪心+优先队列
C - Fedor and couponsAll our characters have hobbies. The same is true for Fedor. He enjoys shopping in the neighboring supermarket.The goods in the supermarket have unique integer ids. Al
2017-08-25 11:26:59
338
原创 【POJ - 3304 Segments】 直线线段相交判断
C - Segments Given n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected segments
2017-08-24 16:20:00
642
原创 【POJ - 2398 Toy Storage】 点与线的关系
B - Toy StorageMom and dad have a problem: their child, Reza, never puts his toys away when he is finished playing with them. They gave Reza a rectangular box to put his toys in. Unfortunate
2017-08-23 21:24:34
279
原创 【POJ - 2318 TOYS】 点与线的关系
A - TOYS Calculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a problem - their child John never puts his toys away when he is finished playing wit
2017-08-23 20:34:15
250
原创 【CodeForces - 761C Dasha and Password】 暴力 + DP
D - Dasha and PasswordAfter overcoming the stairs Dasha came to classes. She needed to write a password to begin her classes. The password is a string of length n which satisfies the followi
2017-08-23 10:36:37
381
原创 【CodeForces - 761B Dasha and friends】 暴力
C - Dasha and friendsRunning with barriers on the circle track is very popular in the country where Dasha lives, so no wonder that on her way to classes she saw the following situation:The
2017-08-23 10:18:15
270
原创 【CodeForces - 837D Round Subset】 DP
D - Round SubsetLet's call the roundness of the number the number of zeros to which it ends.You have an array of n numbers. You need to choose a subset of exactly k numbers so that the rou
2017-08-22 19:34:54
290
原创 【CodeForces - 766C Mahmoud and a Message】 DP
C - Mahmoud and a Message Mahmoud wrote a message s of length n. He wants to send it as a birthday present to his friend Moaz who likes strings. He wrote it on a magical paper but he w
2017-08-22 11:02:43
279
原创 【CodeForces - 831C Jury Marks】 暴力
C. Jury Markstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp watched TV-show where k jury members
2017-08-18 13:30:06
254
原创 【CodeForces - 825B Five-In-a-Row】 模拟
B. Five-In-a-Rowtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob play 5-in-a-row game. They ha
2017-08-17 14:28:10
241
原创 【CodeForces - 798C Mike and gcd problem】 思维+贪心
E - Mike and gcd problem Mike has a sequence A = [a1, a2, ..., an] of length n. He considers the sequence B = [b1, b2, ..., bn] beautiful if the gcd of all its elements is bigger t
2017-08-17 10:14:25
285
原创 【CodeForces - 839B Game of the Rows】 贪心
B. Game of the Rowstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDaenerys Targaryen has an army consistin
2017-08-16 13:52:57
320
原创 【CodeForces - 839C Journey】 DFS
C. Journeytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n cities and n - 1 roads in the Seve
2017-08-16 10:41:58
332
原创 【CodeForces - 808B Average Sleep Time】 思维
D - Average Sleep Time It's been almost a week since Polycarp couldn't get rid of insomnia. And as you may already know, one week in Berland lasts k days!When Polycarp went to a doct
2017-08-16 10:22:43
241
原创 【CodeForces - 808C Tea Party】 贪心
E - Tea Party Polycarp invited all his friends to the tea party to celebrate the holiday. He has ncups, one for each of his n friends, with volumes a1, a2, ..., an. His teapot stores
2017-08-16 09:50:07
452
原创 【CodeForces - 821D Okabe and City】 最短路spfa
E - Okabe and City Okabe likes to be able to walk through his city on a path lit by street lamps. That way, he doesn't get beaten up by schoolchildren.Okabe's city is represented by
2017-08-14 16:20:09
527
原创 【CodeForces - 821C Okabe and Boxes】 思维+模拟
D - Okabe and BoxesOkabe and Super Hacker Daru are stacking and removing boxes. There are n boxes numbered from 1 to n. Initially there are no boxes on the stack.Okabe, being a control fre
2017-08-14 15:28:54
397
原创 【CodeForces - 821B Okabe and Banana Trees】 思维
C - Okabe and Banana Trees Okabe needs bananas for one of his experiments for some strange reason. So he decides to go to the forest and cut banana trees.Consider the point (x, y) in
2017-08-14 15:10:18
392
转载 POJ题目分类
借鉴学习转载链接:http://www.cnblogs.com/kuangbin/archive/2011/07/29/2120667.html初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推.
2017-08-11 10:40:19
443
原创 【FZU - 2283 Tic-Tac-Toe】 模拟
L - Tic-Tac-ToeKim likes to play Tic-Tac-Toe.Given a current state, and now Kim is going to take his next move. Please tell Kim if he can win the game in next 2 moves if both player are
2017-08-10 10:34:06
366
原创 【FZU - 2275 Game】 kmp
D - Game Alice and Bob is playing a game.Each of them has a number. Alice’s number is A, and Bob’s number is B.Each turn, one player can do one of the following actions on his ow
2017-08-09 21:54:23
479
原创 【ZOJ - 3870 Team Formation】 异或运算
B - Team FormationFor an upcoming programming contest, Edward, the headmaster of Marjar University, is forming a two-man team from N students of his university.Edward knows the skill level
2017-08-04 09:49:35
323
原创 【SCU - 3596 Article Decryption】 字典树 + DP
I - Article DecryptionTime Limit:1000ms Memory Limit:65536KBDescriptionYou are given an dictionary in which there are N words.Also, you are given an articl
2017-08-03 22:05:59
543
1
原创 【CodeForces - 777E Hanoi Factory】 贪心+栈
E - Hanoi FactoryOf course you have heard the famous task about Hanoi Towers, but did you know that there is a special factory producing the rings for this wonderful game? Once upon a time,
2017-08-01 22:10:24
370
原创 【Gym - 100482B Farmer 】 思维
B - FarmerJohn is a successful farmer and he would like to expand his business. For this reason he is going to buy a new plot of land to grow even more crops (and earn even more money). Curr
2017-08-01 13:18:44
459
原创 【POJ - 2230 Watchcow】 欧拉回路
G - WatchcowBessie's been appointed the new watch-cow for the farm. Every night, it's her job to walk across the farm and make sure that no evildoers are doing any evil. She begins at the barn,
2017-07-29 21:35:14
309
原创 【HDU - 5573 Binary Tree】 构造
F - Binary TreeThe Old Frog King lives on the root of an infinite tree. According to the law, each node should connect to exactly two nodes on the next level, forming a full binary tree.
2017-07-26 20:27:49
301
原创 【POJ - 2955 Brackets】 区间DP
L - BracketsWe give the following inductive definition of a “regular brackets” sequence:the empty sequence is a regular brackets sequence,if s is a regular brackets sequence, then (s)
2017-07-26 11:50:34
234
原创 【HDU - 1059 Dividing】 混合背包
I - DividingMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the
2017-07-26 10:37:36
283
原创 【HDU - 1811 Rank of Tetris】 并查集+拓扑排序
B - Rank of Tetris自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名堂要比福布斯富豪榜还响。关于如何排名,这个不用说都知道是根据Rating从高到低来排,如果两个人具有相同的Rating,那就按这几个人
2017-07-25 20:51:47
290
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人