UVa
文章平均质量分 79
pengkexiaohuai
这个作者很懒,什么都没留下…
展开
-
UVa 725 Division(枚举)
UVA 725 DivisionWrite a program that finds and displays all pairs of 5-digit numbers that between them use the digits0 through9 once each, such that the first number divided by the second原创 2015-08-06 14:15:52 · 256 阅读 · 0 评论 -
UVa 3266 Tian Ji -- The Horse Racing
DescriptionHere is a famous story in Chinese history. That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes to play horse racing with the king and others原创 2015-08-11 16:16:21 · 443 阅读 · 0 评论 -
ACdream 1073 雷霆战机
Description风风最近迷上了一个打飞机游戏——《雷霆战机》,战机分为白二星、绿三星、蓝四星、紫五星,四种品质。当然,最厉害的是紫色五星的战机啦。战机分为升级和进阶两种。升级:提升战机的等级,但战机品质不变。进阶:可将战机提升一个星级(白二星->绿三星->蓝四星->紫五星)。为了简化问题,规定战机进阶规则如下:白色二星:起始等级Lv1级,满级Lv2原创 2015-08-11 11:14:28 · 332 阅读 · 0 评论 -
UVa 10815 Andy's First Dictionary
Andy, 8, has a dream - he wants to produce hisvery own dictionary. This is not an easy task forhim, as the number of words that he knows is,well, not quite enough. Instead of thinking up a原创 2015-08-09 16:23:36 · 218 阅读 · 0 评论 -
UVa 644 Immediate Decodability
DescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all code原创 2015-08-09 16:19:31 · 203 阅读 · 0 评论 -
UVa 537 Artificial Intelligence?
DescriptionPhysics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupils have to read and understand the problem fi原创 2015-08-09 16:16:36 · 290 阅读 · 0 评论 -
UVa 401 Palindromes
PalindromesDescriptionA regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the s原创 2015-07-20 20:29:08 · 279 阅读 · 0 评论 -
UVa 10976 分数拆分
It is easy to see that for every fraction in the form 1 k (k > 0), we can always find two positive integers x and y, x ≥ y, such that: 1 k = 1 x + 1 y Now our question is: can you write a program that原创 2015-08-06 19:22:54 · 380 阅读 · 0 评论 -
UVa 10010 Where's Waldorf?
Where's Waldorf? Given a m by n grid of letters, ( ), and a list of words, find the location in the grid at which the word can be found. A word matches a straight, uninterrupted line of letters in t原创 2015-08-07 16:05:08 · 223 阅读 · 0 评论 -
UVa 10361 Automatic Poetry
\Oh God", Lara Croft exclaims, \it's one of these dumb riddles again!"In Tomb Raider XIV, Lara is, as ever, gunning her way through ancient Egyptian pyramids, pre-historic caves and medival ha原创 2015-08-09 16:14:27 · 235 阅读 · 0 评论 -
UVa 10878 Decode the tape
Description "Machines take me by surprise with great frequency."Alan TuringYour boss has just unearthed a roll of old computer tapes. The tapes have holes in them and might conta原创 2015-08-08 15:20:08 · 200 阅读 · 0 评论 -
UVa 409 Excuses, Excuses!
DescriptionJudge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening to goof原创 2015-08-08 11:13:41 · 257 阅读 · 0 评论 -
UVa 11059 最大乘积(枚举)
输入n个元素组成的序列s,你需要找出一个乘积最大的的连续子序列。如果这个最大的的乘积不是正数,输出-1.1样例输入:32 4 -352 5 -1 2 -1样例输出:8 20分析:连续子序列有两个要素:起点和终点,因此只需枚举起点和终点即可。由于每个元素的绝对值不超过10,一共又不超过18个元素,最大可能的乘积不会超过10^18,可以用long原创 2015-08-06 16:27:53 · 360 阅读 · 0 评论 -
UVa 11292 屠龙勇士
Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowater had always been a prime breeding ground for geese. Due to th原创 2015-08-11 11:12:39 · 354 阅读 · 0 评论