
大白
文章平均质量分 87
SPZn_up
这个作者很懒,什么都没留下…
展开
-
uva 11384 Help is needed for Dexter(模拟)
uva 11384 Help is needed for DexterDexter is tired of Dee Dee. So he decided to keep Dee Dee busy in a game. The game he planned for her is quite easy to play but not easy to win at least not原创 2015-01-26 19:40:20 · 656 阅读 · 0 评论 -
uva 1508 Equipment(暴力+枚举子集)
uva 1508 Equipment题目大意:给出n个5元组,要求从中选取k个,要求5个位置上的数的最大值的和尽量大。解题思路:一开始没思路,看别人题解过的。5位可以组成32种情况,在DFS前预处理,找出32种情况在n组数据中的最大值,然后将这组数据带入DFS中枚举计算。#include#include#include#includeusing name原创 2015-02-04 15:02:30 · 1021 阅读 · 0 评论 -
uva 1509 Leet(暴力)
uva 1509 Leet题目大意:给你一个小写的串,其中每个字母可以替换成k个字符(1~3),同一字母只能对应一个替换;不同字母替换可以相同,给你一个转化后的串问是不是一个合法替换。解题思路:搜索。按顺序搜索即可,每次枚举长度从1~k的所有替换。如果当前字母未被替换,则可以任意替换,如果已经替换,只能选取相同替换向下搜索。#include#include#in原创 2015-02-04 15:13:30 · 799 阅读 · 0 评论 -
uva 1346 Songs(贪心)
uva 1346 Songs题目大意:John Doe 是一个著名的DJ,现在他有n首播放个曲, 每首歌曲有识别符key,歌曲长度l,以及播放频率q。想在John Doe 想将磁带上的歌曲重新排列,方便播放,播放所有歌曲有一个复杂度的计算∑(1≤i≤n)q[i] * ( ∑(1≤j≤i)l[j] ), 然后给出S,请输出重新排列后的第S首歌的识别码。解题思路:贪心。原创 2015-02-04 14:46:08 · 691 阅读 · 0 评论 -
uva 1382 Distant Galaxy (枚举)
uva 1382 Distant Galaxy You are observing a distant galaxy using a telescope above the Astronomy Tower, and you think that a rectangle drawn in that galaxy whose edges are parallel to coordi原创 2015-02-10 19:21:49 · 555 阅读 · 0 评论 -
uva 11729 Commando War(贪心算法)
uva 11729 Commando WarG Commando WarInput: Standard Input Output: Standard Output “Waiting for orders we held in the wood, word from the front never came原创 2015-01-22 19:48:45 · 635 阅读 · 0 评论 -
uva 11292 Dragon of Loowater (勇者斗恶龙系列)
uva 11292 Dragon of Loowate The Dragon of LoowaterOnce upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major problem.The shores of Rellau Creek in central Loowater ha原创 2015-01-22 19:59:40 · 1210 阅读 · 0 评论 -
uva 11300 Spreading the Wealth (中位数的应用)
uva 11300 Spreading the Wealth ProblemA Communist regime is trying to redistribute wealth in a village. They have have decided to sit everyone around a circular table. First, everyone has conv原创 2015-01-22 21:57:03 · 641 阅读 · 0 评论 -
uva 1030 Image Is Everything(迭代更新)
uva 1030 Image Is EverythingYour new company is building a robot that can hold small lightweight objects. The robot will have the intelligence to determine if an object is light enough to hold原创 2015-01-24 22:02:33 · 629 阅读 · 0 评论 -
uva 10881 Piotr's Ants (模拟)
uva 10881 Piotr's Ants"One thing is for certain: there is no stopping them;the ants will soon be here. And I, for one, welcome ournew insect overlords."Kent BrockmanPiotr likes playing wit原创 2015-01-24 15:41:32 · 1043 阅读 · 0 评论 -
uva 11464 Even Parity(逐层递推)
uva 11464 Even ParityWe have a grid of size N x N. Each cell of the grid initially contains a zero(0) or a one(1).The parity of a cell is the number of 1s surrounding that cell. A cell is su原创 2015-01-26 13:33:04 · 845 阅读 · 3 评论 -
uva 1352 Colored Cubes(枚举)
uva 1352 Colored CubesThere are several colored cubes. All of them are of the same size but they may be colored differently. Each face of these cubes has a single color. Colors of distinct fac原创 2015-01-26 13:38:31 · 735 阅读 · 0 评论 -
uva 10382 Watering Grass(贪心)
uva 10382 Watering Grassn sprinklers are installed in a horizontal strip of grass l meters long andw meters wide. Each sprinkler is installed at the horizontal center line of the strip. For原创 2015-02-03 17:54:26 · 664 阅读 · 0 评论 -
uva 11636 Hello World!(找规律)
uva 11636 Hello World!When you first madethe computer to print the sentence“Hello World!”, you felt so happy, not knowinghow complex and interesting the world of programming and algorithmwil原创 2015-01-31 10:11:09 · 1131 阅读 · 0 评论 -
uva 11210 Chinese Mahjong(暴力枚举)
uva 11210 Chinese MahjongMahjong () is a game of Chinese origin usually played by four persons with tiles resembling dominoes and bearing various designs, which are drawn and discarded until o原创 2015-01-26 21:47:47 · 616 阅读 · 0 评论 -
uva 10795 A Different Task(递归模拟)
uva 10795 A Different TaskThe (Three peg) Tower of Hanoi problem is a popular one in computer science. Briefly the problem is to transfer all the disks from peg-A to peg-C using peg-B as i原创 2015-01-28 13:08:58 · 754 阅读 · 0 评论 -
uva 11520 Fill the Square(枚举)
uva 11520 Fill the SquareIn this problem, you have to draw a square using uppercase English Alphabets.To be more precise, you will be given a square grid with some empty blocks and other原创 2015-01-29 16:01:30 · 735 阅读 · 0 评论 -
uva 12124 Assemble(二分法->最小值最大化*)
uva 12124 AssembleRecently your team noticed that the computer you use to practice for programming contests is not good enough anymore. Therefore, you decide to buy a new computer.To make原创 2015-01-29 11:25:03 · 731 阅读 · 0 评论 -
uva 12097 Pie(二分搜索)
uva 12097 PieMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my par原创 2015-01-29 15:56:10 · 726 阅读 · 0 评论 -
uva 1339 Ancient Cipher(字符串处理)
uva 1339 Ancient CipherAncient Roman empire had a strong government system with various departments, including a secret service department. Important documents were sent between provinces and th原创 2015-02-01 11:25:48 · 575 阅读 · 0 评论 -
uva 1368 - DNA Consensus String(字符串处理)
uva 1368 - DNA Consensus String Figure 1. DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four different nucleotides, namely Adenine原创 2015-02-01 11:40:50 · 741 阅读 · 0 评论 -
uva 1335 Beijing Guards(二分)
uva 1335 Beijing GuardsBeijing was once surrounded by four rings of city walls: the Forbidden City Wall, the Imperial City Wall, the Inner City Wall, and finally the Outer City Wall. Most of t原创 2015-01-31 09:26:45 · 700 阅读 · 0 评论 -
uva 10340 All in All(字符串处理)
uva 10340 All in AllYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pending paten原创 2015-02-01 11:52:35 · 755 阅读 · 0 评论 -
uva 11039 Building designing (排序)
uva 11039 Building designingAn 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原创 2015-01-31 09:57:29 · 691 阅读 · 0 评论 -
uva 1267 Network(DFS)
uva 1267 NetworkConsider a tree network with n nodes where the internal nodes correspond to servers and the terminal nodes correspond to clients. The nodes are numbered from 1 ton . Among the se原创 2015-01-31 09:20:50 · 763 阅读 · 0 评论 -
uva 11248 Frequency Hopping (最大流)
uva 11248 Frequency Hopping题目大意:给定一个有向网络,每条边均有一个容量。问是否存在一个从点1到点N,流量为C的流。如果不存在,是否可以恰好修改一条弧的容量,使得存在这样的流。解题思路:先按照题目给出的边建好图,然后跑一发最大流,得到原始最大流C1,如果C1==CC1 == C或者C==0C == 0时,可以直接输出possible。如果不存在这样的流,那么开始找割边,将原创 2015-08-19 21:27:27 · 703 阅读 · 0 评论