
====ACM=====
文章平均质量分 75
SPZn_up
这个作者很懒,什么都没留下…
展开
-
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 · 618 阅读 · 0 评论 -
uva 705 Slash Maze(DFS)
uva 705 Slash MazeBy filling a rectangle with slashes (/) and backslashes ( ), you can generate nice little mazes. Here is an example:As you can see, paths in the maze cannot branch, so the原创 2015-01-25 18:17:34 · 648 阅读 · 0 评论 -
uva 10054 The Necklace(欧拉回路)
uva 10054 The NecklaceMy little sister had a beautiful necklace made of colorful beads. Two successive beads in the necklace shared a common color at their meeting point. The figure below原创 2015-01-26 17:03:31 · 717 阅读 · 0 评论 -
uva 10004 Bicoloring(DFS)
uva 10004 BicoloringIn 1976 the ``Four Color Map Theorem" was proven with the assistance of acomputer. This theorem states that every map can be colored using only fourcolors, in such a way原创 2015-01-27 17:47:26 · 837 阅读 · 0 评论 -
uva 10129 Play on Words(欧拉路)
uva 10129 Play on WordsDescriptionPlay on Words Some of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because th原创 2015-01-26 15:48:35 · 617 阅读 · 0 评论 -
uva 575 Skew Binary(数论)
uva 575 Skew BinaryWhen a number is expressed in decimal, the k-th digit represents a multiple of 10k. (Digits are numbered from right to left, where the least significant digit is number 0.)原创 2015-01-26 17:24:00 · 590 阅读 · 0 评论 -
uva 639 Don't Get Rooked (暴力回溯 )
uva 639 Don't Get RookedIn chess, the rook is a piece that can move any number of squares vertically or horizontally. In this problem we will consider small chess boards (at most 44) tha原创 2015-01-27 16:16:17 · 798 阅读 · 0 评论 -
uva 140 Bandwidth (全排列+暴力枚举)
uva 140 Bandwidth Given a graph (V,E) where V is a set of nodes and E is a set of arcs in VxV, and anordering on the elements in V, then the bandwidth of a node v is defined as the maxim原创 2015-01-27 22:01:16 · 669 阅读 · 0 评论 -
uva 10596 Morning Walk (欧拉回路)
uva 10596 Morning WalkKamal is a Motashota guy. He has got a new job in Chittagong . So, he has moved to Chittagong from Dinajpur. He was getting fatter in Dinajpur as he had no work in his ha原创 2015-01-27 10:48:28 · 671 阅读 · 0 评论 -
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 · 652 阅读 · 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 · 614 阅读 · 0 评论 -
uva 216 Getting in Line (暴力枚举)
uva 216 Getting in Line Computer networking requires that the computers in the network be linked. This problem considers a ``linear" network in which the computers are chained together so原创 2015-01-27 13:05:19 · 1017 阅读 · 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 · 748 阅读 · 0 评论 -
hdu 1285 确定比赛名次 (拓扑排序)
hdu 1285 确定比赛名次 Description有N个比赛队(1<=N<=500),编号依次为1,2,3,。。。。,N进行比赛,比赛结束后,裁判委员会要将所有参赛队伍从前往后依次排名,但现在裁判委员会不能直接获得每个队的比赛成绩,只知道每场比赛的结果,即P1赢P2,用P1,P2表示,排名时P1在P2之前。现在请你编程序确定排名。 Inpu原创 2015-01-29 22:23:41 · 618 阅读 · 0 评论 -
uva 301 Transportation(回溯)
uva 301 TransportationRuratania is just entering capitalism and is establishing new enterprising activities in many fields including transport. The transportation company TransRuratania is sta原创 2015-01-29 11:05:53 · 759 阅读 · 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 · 731 阅读 · 0 评论 -
uva 539 The Settlers of Catan(回溯)
uva 539 The Settlers of CatanWithin Settlers of Catan, the 1995 German game of the year, players attempt to dominate an island by building roads, settlements and cities across its uncharted wilder原创 2015-01-29 11:12:14 · 599 阅读 · 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 · 717 阅读 · 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 · 722 阅读 · 0 评论 -
uva 10344 23 out of 5 (DFS)
uva 10344 23 out of 5 Your task is to write a program that can decide whether you can find an arithmetic expression consisting of five given numbers(1For this problem we will only consid原创 2015-01-29 12:06:46 · 693 阅读 · 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 · 753 阅读 · 0 评论 -
uva 10305 Ordering Tasks (简单拓扑)
uva 10305 Ordering Tasks John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task is only possible if other tasks have already been executed.原创 2015-02-01 11:56:59 · 769 阅读 · 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 · 739 阅读 · 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 · 1126 阅读 · 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 · 738 阅读 · 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 · 687 阅读 · 0 评论 -
uva 10047 The Monocycle (BFS)
uva 10047 The Monocycle A monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel colored with five different colors as原创 2015-01-31 15:32:02 · 761 阅读 · 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 · 696 阅读 · 0 评论 -
HDU 2084 数塔(DP初步应用)
HDU 2084 数塔在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的: 有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少? 已经告诉你了,这是个DP的题目,你能AC吗? Input输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1原创 2015-01-13 22:00:57 · 509 阅读 · 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 · 568 阅读 · 0 评论 -
uva 193 Graph Coloring(回溯)
uva 193 Graph ColoringYou are to write a program that tries to find an optimal coloring for a given graph. Colors are applied to the nodes of the graph and the only available colors are bl原创 2015-02-01 12:01:26 · 1019 阅读 · 0 评论 -
uva 699 The Falling Leaves (二叉树)
uva 699 The Falling LeavesEach year, fall in the North Central region is accompanied by the brilliant colors of the leaves on the trees, followed quickly by the falling leaves accumulating und原创 2015-02-01 19:59:30 · 664 阅读 · 0 评论 -
uva 208 Firetruck (回溯)
uva 208 FiretruckThe Center City fire department collaborates with the transportation department to maintain maps of the city which reflects the current status of the city streets. On any give原创 2015-02-01 20:13:50 · 538 阅读 · 0 评论 -
hdu 5167 Fibonacci(DFS)
hdu 5167 Fibonacci问题描述斐波那契数列的递归定义如下:Fi=⎧⎩⎨01Fi−1+Fi−2i = 0i = 1i > 1现在我们需要判断一个数是否能表示为斐波那契数列中的数的乘积。输入描述有多组数据,第一行为数据组数T(T≤100,000)。对于每组数据有一个整数n,表示要判断的数字。0≤n≤1,000,000,000输出描述对于每原创 2015-02-02 17:28:10 · 894 阅读 · 0 评论 -
uva 111 History Grading(DP初步应用)
uva 111 History GradingMany problems in Computer Science involve maximizing some measure according to constraints.Consider a history exam in which students are asked to put several histori原创 2015-01-13 21:49:42 · 547 阅读 · 0 评论 -
uva 532 Dungeon Master(BFS)
uva 532 Dungeon MasterYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one mi原创 2015-02-02 13:37:58 · 963 阅读 · 0 评论 -
uva 10106 Product
uva 10106 Product题目大意:两个数求积。解题思路:高精度乘法,要注意因子为0的时候,思想跟高精度加法差不多。#include#includeint main() { int c = 0; char s1[1000], s2[1000]; char a[1000], b[1000]; memset(a, 0, sizeof(a)); memset原创 2014-12-24 19:50:36 · 562 阅读 · 0 评论 -
uva 350 Pseudo-Random Numbers
uva 350 Pseudo-Random Numbers题目大意:给出z、l、m、i,根据公式l = (z * l + i ) % m,问l形成的循环有多少数。解题思路:只要注意形成的循环第一个元素不一定是原先的l,没什么难度,但是因为格式WA了两次 orz。 再一次证明了格式的重要性。#include#includeint main(){ int cnt2原创 2014-12-23 16:49:06 · 666 阅读 · 0 评论 -
uva 10815 Andy's First Dictionary
uva 10815 Andy's First Dictionary题目大意:把所有单词按字典序排列,重复的输出一次。解题思路:注意sort的用法.#include #include #include using namespace std;struct S { char str[201]; }; S s[50000];int原创 2014-12-20 22:32:33 · 420 阅读 · 0 评论 -
uva 10970 Big Chocolate
uva 10970 Big Chocolate 题目大意:求将一个N* M的巧克力分成1 * 1的小块最少切几刀。解题思路:注满水的巧克力。#includeint main() { int a, b; while (scanf("%d %d\n", &a, &b) != EOF) { printf("%d\n", a * b - 1); }原创 2014-12-24 21:26:06 · 529 阅读 · 0 评论