- 博客(48)
- 收藏
- 关注
原创 1554 - Binary Search(暴力枚举)
The program fragment below performs binary search of an integer number in an array that is sorted in a nondescending order:Pascal (file "sproc.pas")C (file "sproc.c")const MAXN =
2014-02-28 23:44:59 1417
原创 12235 - Help Bubu(状态压缩dp)
Bubu's bookshelf is in a mess! Help him!There are n books on his bookshelf. We define the mess value to be the number of segments of consecutive equal-height books. For example, if the book height
2014-02-28 22:59:35 1347
原创 Codeforces Round #232 (Div. 2)
Problems #Name AOn Segment's Own Pointsstandard input/output1 s, 256 MB x1657BOn Corruption and Numbersstanda
2014-02-28 12:51:24 1239
原创 10609 - Fractal (模拟,dfs)
Problem AFractalInput: Standard InputOutput: Standard OutputTime Limit: 3 Seconds A fractal is a rough or fragmented geometric shape that can be subdivided in parts, each of which is (at l
2014-02-27 12:35:30 1275
原创 UVA 1354 - Mobile Computing(暴力枚举)
There is a mysterious planet called Yaen, whose space is 2-dimensional. There are many beautiful stones on the planet, and the Yaen people love to collect them. They bring the stones back home and mak
2014-02-26 11:27:30 2166
原创 1427 - Parade (dp+单调队列)
Panagola, The Lord of city F likes to parade very much. He always inspects his city in his car and enjoys the welcome of his citizens. City F has a regular road system. It looks like a matrix with n +
2014-02-26 09:06:26 1268
原创 UVA 1407 - Caves(树形DP)
It is said that the people of Menggol lived in caves. A tribe's caves were connected to each other with paths. The paths were so designed that there was one and only one path to each cave. So the cave
2014-02-24 23:38:25 1509
原创 【索引】Chapter 1. Algorithm Design :: Dynamic Programming :: Exercises: Beginner
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=465 TitleTotal Submissions / Solving %Total Users / Solving %11584 - Partitioning by Palindro
2014-02-24 13:07:41 1115
原创 【索引】Chapter 1. Algorithm Design :: Designing Efficient Algorithms :: Exercises: Beginner
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=461 TitleTotal Submissions / Solving %Total Users / Solving %10125 - Sumsets17713
2014-02-24 12:50:21 1045
原创 UVA 1252 - Twenty Questions(状态压缩DP+记忆化搜索)
Consider a closed world and a set of features that are defined for all the objects in the world. Each feature can be answered with ``yes" or ``no". Using those features, we can identify any object fro
2014-02-23 22:01:22 2064 4
原创 UVA 1291 - Dance Dance Revolution(dp)
Mr. White, a fat man, now is crazy about a game named ``Dance, Dance, Revolution". But his dance skill is so poor that he could not dance a dance, even if he dances arduously every time. Does ``DDR" j
2014-02-23 17:06:01 1197
原创 UVA 1351 - String Compression(区间DP)
Run Length Encoding(RLE) is a simple form of compression. RLE consists of the process for searching for a repeated runs of a single character in a string to be compressed, and replacing them by a sing
2014-02-23 12:03:35 1719
原创 UVA 1292 - Strategic game(树形dp)
Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad. Now he has the following problem. He must defend a medieva
2014-02-23 09:29:01 1390
原创 Codeforces Round #231 (Div. 2)
Problems #Name ACounting Sticksstandard input/output1 s, 256 MB x2326BVery Beautiful Numberstandard input/out
2014-02-22 08:12:28 1357
原创 UVA 473 - Raucous Rockers(dp)
Raucous Rockers You just inherited the rights to n previously unreleased songs recorded by the popular group Raucous Rockers. You plan to release a set of m compact disks with a selectio
2014-02-21 13:11:51 1983
原创 UVA 672 - Gangsters(dp)
Gangsters N gangsters are going to a restaurant. The i-th gangster comes at the time Ti and has the prosperity Pi. The door of the restaurant has K+1 states of openness expressed by th
2014-02-20 22:18:01 1427
原创 UVA 1366 - Martian Mining(dp)
ach cell you can build either type of conveyor belt, but you cannot build both of them in the same cell. If two conveyor belts of the same type are next to each other, then they can be connected. For
2014-02-20 12:58:54 1218
原创 1452 - Jump(dp+约瑟夫环变形)
Integers 1, 2, 3,..., n are placed on a circle in the increasing order as in the following figure. We want to construct a sequence from these numbers on a circle. Starting with the number 1, we cont
2014-02-20 10:08:08 1627
原创 UVA 11795 - Mega Man's Mission(状态压缩dp)
BMega Man’s MissionsInputStandard InputOutputStandard Output Mega Man is off to save the world again. His objective is to kill the Robots created by
2014-02-20 09:37:49 1679
原创 Codeforces Round #230 (Div. 2)
Problems #Name ANineteenstandard input/output1 s, 256 MB x1710BThree matricesstandard input/output1 s, 256
2014-02-20 02:54:16 1374
原创 UVA 1456 - Cellular Network(dp + 贪心)
A cellular network is a radio network made up of a number of cells each served by a base station located in the cell. The base station receives call signals from mobile users (mobiles) in the cell i
2014-02-19 08:31:14 1089
原创 UVA 10691 - Subway(贪心+区间选点)
Problem DSubwayInput: standard inputOutput: standard outputTime Limit: 4 secondsThe government in a foreign land is looking into the possibility of establishing a subway system in its capita
2014-02-18 17:51:38 1176
原创 【索引】Chapter 1. Algorithm Design :: Dynamic Programming :: Examples
题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=464点击题号进入题解:Root :: AOAPC I: Beginning Algorithm Contests -- Training Guide (Rujia Liu) :: Chapter 1. Alg
2014-02-18 11:58:41 876
原创 UVA 1169(dp + 单调队列)
Problem C - RobotruckBackgroundThis problem is about a robotic truck that distributes mail packages to several locations in a factory. The robot sits at the end of a conveyer at the mail office
2014-02-18 11:50:32 1771
原创 UVA 11404 - Palindromic Subsequence(dp)
Palindromic Subsequence A Subsequence is a sequence obtained by deleting zero or more characters in a string. A Palindrome is a string which when read from left to right, reads same as w
2014-02-17 22:54:36 1408
原创 UVA 11552 - Fewest Flops(dp+贪心)
Problem FFEWEST FLOPSA common way to uniquely encode a string is by replacing its consecutive repeating characters (or “chunks”) by the number of times the character occurs followed by the
2014-02-16 23:15:27 1376
原创 UVA 1424 - Salesmen(dp)
Traveling salesmen of nhn. (the prestigious Korean internet company) report their current location to the company on a regular basis. They also have to report their new location to the company if th
2014-02-16 21:13:16 1116
原创 11584 - Partitioning by Palindromes(dp)
We say a sequence of characters is a palindrome if it is the same written forwards and backwards. For example, 'racecar' is a palindrome, but 'fastcar' is not.A partition of a sequence of characters
2014-02-16 19:12:50 1086
原创 UVA 1099 - Sharing Chocolate(记忆化搜索+状态压缩)
Chocolate in its many forms is enjoyed by millions of people around the world every day. It is a truly universal candy available in virtually every country around the world.You find that the only th
2014-02-16 14:13:36 3040 2
原创 10859 - Placing Lampposts(树形dp)
Output: Standard OutNext Generation Contest 1 Time Limit: 2 secondsProblem DPlacing LamppostsAs a part of the mission �Beautification of Dhaka City�,
2014-02-15 02:55:50 2235
原创 UVA 11825 - Hackers' Crackdown(dp+状态压缩)
Problem HHackers’ Crackdown Input: Standard InputOutput: Standard Output Miracle Corporations has a number of system services running in a distributed computer system which is a prime targ
2014-02-14 22:30:33 1290
原创 UVA 1394 - And Then There Was One(dp+约瑟夫环变形)
Let's play a stone removing game.Initially, n stones are arranged on a circle and numbered 1,..., n clockwise (Figure 1). You are also given two numbers k and m . From this state, remove stones on
2014-02-14 09:44:18 1534
原创 12265 - Selling Land(单调队列)
G Selling LandAs you may know, the country of Absurdistan is full of abnormalities. For example, the whole country can be divided into unit squares that are either grass or swamp. Also, the count
2014-02-13 08:37:53 1500
原创 Codeforces Round #229 (Div. 2)
Problems #Name AInna and Alarm Clockstandard input/output1 s, 256 MB x2312BInna, Dima and Songstandard input/
2014-02-12 11:09:46 1763 3
原创 UVA 12174 - Shuffle(技巧枚举+预处理)
You are listening to your music collection using the shuffle function to keep the music surprising. You assume that the shuffle algorithm of your music player makes a random permutation of the songs i
2014-02-11 02:20:36 2412 2
原创 1442 - Cav(扫描+推理)
As an owner of a land with a cave you were delighted when you last heard that underground fuel tanks are great business. Of course, the more volume one can store, the better. In case of your cave, the
2014-02-10 20:42:10 1968
原创 UVA 1325 - Hypertransmission(扫描方法)
The president of the Galactic Federation has recently decided that all planets of the galaxy must establish hyper-radio centers to broadcast their programs. To ensure the process, the government has s
2014-02-10 08:18:43 1817
原创 UVA 221 - Urban Elevations(枚举+区间覆盖)
Urban Elevations An elevation of a collection of buildings is an orthogonal projection of the buildings onto a vertical plane. An external elevation of a city would show the skyline and
2014-02-10 08:18:22 3529
原创 1312 - Cricket Field(技巧枚举+离散化)
Once upon a time there was a greedy King who ordered his chief Architect to build a field for royal cricket inside his park. The King was so greedy, that he would not listen to his Architect's proposa
2014-02-10 08:18:02 1717
原创 UVA 1432 - Fire-Control System(技巧枚举+线性扫描)
A new mighty weapon has just been developed, which is so powerful that it can attack a sector of indefinite size, as long as the center of the circle containing the sector is the location of the weapo
2014-02-10 08:17:17 1568
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人