
UVA
XMzhou
当你想要放弃的时候问问自己为什么坚持到了现在
展开
-
UVA 10003 —— 区间DP
10003 - Cutting SticksTime limit: 3.000 seconds Cutting Sticks You have to cut a wood stick into pieces. The most affordable company, The Analog Cutting Machinery, Inc. (A原创 2013-11-07 11:41:18 · 837 阅读 · 0 评论 -
UVA 12299
RMQ with Shifts In the traditional RMQ (Range Minimum Query) problem, we have a static array A. Then for each query (L, R)(LR), we report the minimum value among A[L], A[L + 1], ..., A[R原创 2013-08-08 23:22:12 · 814 阅读 · 0 评论 -
UVA 1401
1401 - Remember the WordTime limit: 3.000 secondsNeal is very curious about combinatorial problems, and now here comes a problem about words. Knowing that Ray has a photographic memory and this原创 2013-08-18 19:59:25 · 715 阅读 · 0 评论 -
UVA 11235
2007/2008 ACM International Collegiate Programming Contest University of Ulm Local ContestProblem F: Frequent valuesYou are given a sequence of n integers a1 , a2 , ... , an in non-decreasin原创 2013-08-06 09:27:57 · 927 阅读 · 0 评论 -
UVA 11995
Problem II Can Guess the Data Structure!There is a bag-like data structure, supporting two operations:1 xThrow an element x into the bag.2Take out an element from the bag.Given a seque原创 2013-08-05 15:07:33 · 851 阅读 · 0 评论 -
UVA 11584
Problem H: Partitioning by PalindromesWe 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原创 2013-08-05 01:02:22 · 1186 阅读 · 0 评论 -
UVA 10037 - Bridge
Problem D: Bridgen people wish to cross a bridge at night. A group of at most two people may cross at any time, and each group must have a flashlight. Only one flashlight is available among the原创 2013-05-31 12:33:36 · 875 阅读 · 0 评论 -
UVA 10783 - Odd Sum
Odd Sum Given a range [a, b], you are to find the summation of all the odd integers in this range. For example, the summation of all the odd integers in the range [3, 9] is 3 + 5 + 7 +原创 2013-05-31 21:16:21 · 1028 阅读 · 0 评论 -
UVA 10370 - Above Average
Problem D: Above AverageIt is said that 90% of frosh expect to be above average in their class. You are to provide a reality check.The first line of standard input contains an integer C, the numbe原创 2013-05-31 21:25:12 · 1161 阅读 · 0 评论 -
UVA 10008 - What's Cryptanalysis?
What's Cryptanalysis? Cryptanalysis is the process of breaking someone else's cryptographic writing. This sometimes involves some kind of statistical analysis of a passage of (encrypted) t原创 2013-05-31 22:10:12 · 1259 阅读 · 0 评论 -
UVA 11988
Problem BBroken Keyboard (a.k.a. Beiju Text)You're typing a long text with a broken keyboard. Well it's not so badly broken. The only problem with the keyboard is that sometimes the "home" key o原创 2013-08-08 19:24:27 · 852 阅读 · 0 评论 -
UVA 10131
Question 1: Is Bigger Smarter?The ProblemSome people think that the bigger an elephant is, the smarter it is. To disprove this, you want to take the data on a collection of elephants and put as la原创 2013-08-15 16:58:31 · 638 阅读 · 0 评论 -
UVA 1449
1449 - Dominating PatternsTime limit: 3.000 secondsThe archaeologists are going to decipher a very mysterious ``language". Now, they know many language patterns; each pattern can be treated as a原创 2013-08-18 21:50:35 · 706 阅读 · 0 评论 -
UVA 10465 —— 完全背包
10465 - Homer SimpsonTime limit: 3.000 secondsReturn of the AztecsProblem C:Homer SimpsonTime Limit: 3 secondsMemory Limit: 32 MBHomer Simpson, a very smart原创 2013-11-07 14:00:04 · 992 阅读 · 0 评论 -
UVA 11136 —— 简单STL
Problem H: Hoax or whatEach Mal-Wart supermarket has prepared a promotion scheme run by the following rules:A client who wants to participate in the promotion (aka a sucker) must write down th原创 2013-08-08 18:54:22 · 716 阅读 · 0 评论 -
UVA 624 —— 01背包&路径输出
624 - CDTime limit: 3.000 seconds CD You have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is on CDs. You need to have it on ta原创 2013-11-04 22:06:28 · 765 阅读 · 0 评论 -
UVA 674 —— 简单DP
674 - Coin ChangeTime limit: 3.000 seconds Coin Change Suppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these原创 2013-11-04 17:39:13 · 577 阅读 · 0 评论 -
UVA 11732 —— 左儿子右兄弟表示法&&Tire
11732 - strcmp() Anyone?Time limit: 2.000 secondsJ“strcmp()” Anyone?Input: Standard InputOutput: Standard Output strcmp() is a library function in C/C++ which原创 2013-08-27 14:46:25 · 1284 阅读 · 0 评论 -
POJ 1144 && UVA 315 ——无向连通图求割顶
NetworkTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8111 Accepted: 3823DescriptionA Telephone Line Company (TLC) is establishing a new telephone cabl原创 2013-09-25 21:57:12 · 813 阅读 · 0 评论 -
UVA 11137
11137 - Ingenuous CubrencyTime limit: 3.000 secondsProblem I: Ingenuous CubrencyPeople in Cubeland use cubic coins. Not only the unit of currency is called a cube but also the coins are shap原创 2013-09-07 15:51:34 · 698 阅读 · 0 评论 -
UVA 11375
11375 - MatchesTime limit: 2.000 secondsProblem E: MatchesWe can make digits with matches as shown below:Given N matches, find the number of different numbers representab原创 2013-09-07 13:57:00 · 833 阅读 · 0 评论 -
UVA 11992
Problem FFast Matrix OperationsThere is a matrix containing at most 106 elements divided into r rows and c columns. Each element has a location (x,y) where 1<=x<=r,1<=y<=c. Initially, all the el原创 2013-08-18 00:14:06 · 933 阅读 · 0 评论 -
UVA 151 - Power Crisis
Power Crisis During the power crisis in New Zealand this winter (caused by a shortage of rain and hence low levels in the hydro dams), a contingency scheme was developed to turn off the po原创 2013-06-01 00:01:01 · 1474 阅读 · 0 评论 -
UVA 1450
AirportA big city has an international airport handling 40 million passengers a year. But this is notorious as one of the most congested airports in the world. In this airport, there is only one lan原创 2013-08-03 21:47:07 · 814 阅读 · 0 评论 -
HDOJ 1052 & UVA1344
Tian Ji -- The Horse RacingTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13390 Accepted Submission(s): 3768Problem Description原创 2013-04-10 16:26:10 · 765 阅读 · 0 评论 -
UVA 846
Steps One steps through integer points of the straight line. The length of a step must be nonnegative and can be by one bigger than, equal to, or by one smaller than the length of the pr转载 2013-04-13 22:37:33 · 700 阅读 · 0 评论 -
UVA 10127
10127 - OnesTime limit: 3.000 secondsProblem E - OnesGiven any integer 0 Sample input3 7 9901Output for sample input3612直接公式秒掉!#include #include #include原创 2013-04-13 22:25:23 · 873 阅读 · 0 评论 -
UVA 10018
Reverseand AddThe ProblemThe "reverse and add" method is simple: choose a number, reverse its digitsand add it to the original. If the sum is not a palindrome (which means,it is not the same numbe原创 2013-04-13 21:11:44 · 990 阅读 · 0 评论 -
UVA 10035
Problem B: Primary ArithmeticChildren are taught to add multi-digit numbers from right-to-left onedigit at a time. Many find the "carry" operation - in which a 1 iscarried from one digit position原创 2013-04-13 20:38:39 · 1080 阅读 · 1 评论 -
UVA 10252
Problem GCommon PermutationInput: standard inputOutput: standard outputTime Limit: 4 secondsMemory Limit: 32 MB Given two strings of lowercase letters, a and b, print the longest string原创 2013-04-12 23:51:06 · 844 阅读 · 0 评论 -
UVA 136
Ugly Numbers Ugly numbers are numbers whose only prime factors are 2, 3 or 5. The sequence1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, ...shows the first 11 ugly numbers. By convention, 1原创 2013-04-11 19:51:55 · 792 阅读 · 0 评论 -
UVA 10267
Problem E: Graphical Editor ProblemThe simple graphical editor deals with a rectangular table M×N (1. Each pixel of the table has its colour. The picture is formed from this square pix原创 2013-04-11 17:09:54 · 745 阅读 · 0 评论 -
UVA 10189
Problem B: Minesweeper The ProblemHave you ever played Minesweeper? It's a cute little game which comes within a certain Operating System which name we can't really remember. Well, the原创 2013-04-11 00:27:55 · 840 阅读 · 0 评论 -
UVA 100
100 - The 3n + 1 problemTime limit: 3.000 secondsUVA第一题就有这么多trick , 伤不起啊。首先 , 输入的两个数不一定谁大谁小 , 但你输出时还要按原顺序 , 其次 , 中间变量 n 要 long long#include #include #include using namespace原创 2013-04-10 21:21:25 · 783 阅读 · 0 评论 -
UVA 10034
Problem A: FrecklesIn an episode of the Dick Van Dyke show, little Richie connects the freckles on his Dad's back to form a picture of the Liberty Bell. Alas, one of the freckles turns out to be a原创 2013-04-25 23:22:23 · 763 阅读 · 0 评论 -
UVA 567
Risk Risk is a board game in which several opposing players attempt to conquer the world. The gameboard consists of a world map broken up into hypothetical countries. During a player's tur原创 2013-04-25 21:01:46 · 584 阅读 · 0 评论 -
UVA 10397
Problem EConnect the CampusInput: standard inputOutput: standard outputTime Limit: 2 secondsMany new buildings are under construction on the campus of the University of Waterloo. The univers原创 2013-04-27 02:36:10 · 803 阅读 · 0 评论 -
UVA 1368
Figure 1.DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four different nucleotides, namely Adenine, Thymine, Guanine, and Cytosine as shown in Fi原创 2013-08-03 18:48:00 · 1236 阅读 · 0 评论 -
UVA 1339
Ancient Roman empire had a strong government system with various departments, including a secret service department. Important documents were sent between provinces and the capital in encrypted form t原创 2013-08-03 15:51:22 · 796 阅读 · 0 评论 -
UVA 11039
Building designing An architect wants to design a very high building. The building will consist of some floors, and each floor has a certain size. The size of a floor must be greater than原创 2013-08-03 15:05:18 · 675 阅读 · 0 评论