- 博客(32)
- 资源 (8)
- 收藏
- 关注
原创 UVa 10282 - Babelfish STL Map
Problem C: BabelfishYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understan
2014-03-20 19:57:28 1330
原创 poj 1419 Graph Coloring 图着色问题
Graph ColoringTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 3829 Accepted: 1710 Special JudgeDescriptionYou are to write a program that tries to f
2014-03-19 20:02:19 2008
原创 UVa 639 - Don't Get Rooked 类皇后问题 递归回溯
Don't Get Rooked In 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) that can a
2014-03-16 12:39:43 1392
原创 UVa 167 - The Sultan's Successors 递归回溯
The Sultan's Successors The Sultan of Nubia has no children, so she has decided that the country will be split into up to k separate parts on her death and each part will be inherited by w
2014-03-14 20:55:10 1743 3
原创 UVa 539 - The Settlers of Catan 递归回溯
The Settlers of Catan Within 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 wilde
2014-03-14 18:45:12 1247 1
原创 UVa 10344 - 23 out of 5 递归回溯
Problem I23 Out of 5Input: standard inputOutput: standard outputTime Limit: 1 secondMemory Limit: 32 MBYour task is to write a program that can decide whether you can find an arithmetic ex
2014-03-14 18:42:50 1109
原创 UVa 216 - Getting in Line 递归回溯
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 that
2014-03-13 10:46:47 1177 2
原创 UVa 10474 - Where is the Marble?
Where is the Marble? Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the marbles one after another
2014-03-12 21:36:57 1061
原创 UVa 729 - The Hamming Distance Problem 排列组合
The Hamming Distance Problem The Hamming distance between two strings of bits (binary integers) is the number of corresponding bit positions that differ. This can be found by using XOR on
2014-03-12 20:33:29 1605
原创 UVa 10098 - Generating Fast STL 排序+排列
Problem C Generating Fast, Sorted PermutationInput: Standard InputOutput: Standard Output Generating permutation has always been an important problem in computer science. In this problem y
2014-03-12 20:04:27 1315
原创 UVa 146 - ID Codes STL 排列
ID Codes It is 2084 and the year of Big Brother has finally arrived, albeit a century late. In order to exercise greater control over its citizens and thereby to counter a chronic breakdow
2014-03-12 19:52:58 1195 1
原创 Uva 10167 - Birthday Cake 暴力枚举
Problem G. Birthday Cake BackgroundLucy and Lily are twins. Today is their birthday. Mother buys a birthday cake for them.Now we put the cake onto a Descartes coordinate. Its center is
2014-03-12 18:55:55 1679 1
原创 最大乘积
最大乘积输入n个元素组成的序列s,你需要找出一个乘积最大的连续子序列。如果这个最大的成绩不是正数,应输入-1(表示无解)。输入0结束输入。1。样例输入:32 4 -352 5 -1 2 -1样例输出:820#include #include #include using namespace std;
2014-03-12 14:28:56 1336 3
原创 简单枚举
7.1.1简单枚举除法输入正整数n,按从小到大的顺序输出所有形如abcde/fghij=n的表达式,其中a~j恰好为数字0~9的一个排列,2样例输入:62样例输出:79546/01238=6294736/01528=62#include #include #include using namespace std;
2014-03-12 14:14:55 1319 1
原创 UVa 10305 - Ordering Tasks 拓扑排序
Problem FOrdering TasksInput: standard inputOutput: standard outputTime Limit: 1 secondMemory Limit: 32 MB John has n tasks to do. Unfortunately, the tasks are not independent and the ex
2014-03-12 11:18:22 1109 2
原创 UVa 10596 - Morning Walk 有向图的欧拉回路
Problem HMorning WalkTime Limit3 Seconds Kamal is a Motashota guy. He has got a new job in Chittagong. So, he has moved to Chittagong from Dinajpur. He was getting fa
2014-03-12 10:39:46 1287 2
原创 UVa 10054 - The Necklace 欧拉回路
Problem D: The Necklace My 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 belo
2014-03-12 09:54:06 1016 1
原创 UVa 10129 - Play on Words 欧拉道路
Play on WordsSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Because there is no other way to open the doors, the puzz
2014-03-11 19:56:37 1394 1
原创 UVa 548 - Tree
Tree You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of a
2014-03-10 09:43:41 1228 2
原创 UVa 536 - Tree Recovery 前中序求后序
Tree RecoveryLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in the nodes.This is an e
2014-03-08 11:56:20 1245
原创 UVa 112 - Tree Summing
Tree Summing BackgroundLISP was one of the earliest high-level programming languages and, with FORTRAN, is one of the oldest languages currently being used. Lists, which are the fundam
2014-03-08 10:27:50 1247
原创 UVa 10152 - ShellSort
Problem D: ShellSortHe made each turtle stand on another one's backAnd he piled them all up in a nine-turtle stack.And then Yertle climbed up. He sat down on the pile.What a wonderful view! He
2014-03-07 19:11:20 1004
原创 UVa 673 - Parentheses Balance
Parentheses Balance You are given a string consisting of parentheses () and []. A string of this type is said to becorrect:(a)if it is the empty string(b)if A and B are correct, AB is co
2014-03-07 16:47:52 880
原创 UVa 133 - The Dole Queue
The Dole Queue In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every day all dole applicants
2014-03-07 13:16:10 1161
原创 UVa 101 - The Blocks Problem 栈模拟 TLE
The Blocks ProblemBackgroundMany areas of Computer Science use simple, abstract domains for both analytical and empirical studies. For example, an early AI study of planning and
2014-03-06 16:34:31 1203
原创 UVa 127 - "Accordian" Patience 栈+模拟
``Accordian'' Patience You are to simulate the playing of games of ``Accordian'' patience, the rules for which are as follows:Deal cards one by one in a row from left to right, not ove
2014-03-05 11:53:33 1192
原创 UVa 10898 Combo Deal DP
D: Combo Deal A fast food store offers a series of ``combo meal deals" in addition to individually priced items. For example, the menu at the store may look like this:Hamburger
2014-03-04 16:00:10 1648
原创 UVa 10465 - Homer Simpson DP 完全背包
Problem C:Homer SimpsonTime Limit: 3 secondsMemory Limit: 32 MBHomer Simpson, a very smart guy, likes eating Krusty-burgers. It takes Homer m minutes to eat a Krusty- bur
2014-03-03 21:28:48 1306
原创 poj 3628 Bookshelf 2
Bookshelf 2Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7036 Accepted: 3232DescriptionFarmer John recently bought another bookshelf for the cow libra
2014-03-03 11:39:52 1142
原创 UVa 990 - Diving for Gold DP 0-1
Diving for goldProblemJohn is a diver and a treasure hunter. He has just found the location of a pirate ship full of treasures. The sofisticated sonar system on board his ship allows him to identi
2014-03-03 11:13:42 1344
原创 UVa 624 - CD DP 0/1 背包问题
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 tapes so the problem to solve is: you have a tape N min
2014-03-03 09:12:18 1383
原创 poj 3624 Charm Bracelet DP 0/1 背包问题
Charm BraceletTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 19193 Accepted: 8739DescriptionBessie has gone to the mall's jewelry store and spies a cha
2014-03-02 23:17:11 1564
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人