
UVa
文章平均质量分 80
「已注销」
这个作者很懒,什么都没留下…
展开
-
UVa10815_Andy's First Dictionary(小白书字符串专题)
解题报告思路:字典树应用,dfs回溯遍历字典树#include #include #include using namespace std;struct node { int v; node *next[26];};int l,m,cnt;char str[100],ch[100],dic[5500][100];node *newnode(){原创 2014-07-30 21:33:18 · 1151 阅读 · 0 评论 -
UVa10361_Automatic Poetry(小白书字符串专题)
Automatic PoetryInput: standard inputOutput: standard outputTime Limit: 2 secondsMemory Limit: 32 MB “Oh God”, Lara Croft exclaims, “it’s one of these dumb riddles again!” In Tomb原创 2013-12-30 14:43:32 · 751 阅读 · 0 评论 -
UVa401_Palindromes(小白书字符串专题)
Description Palindromes A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome原创 2013-12-30 14:38:06 · 990 阅读 · 0 评论 -
UVa644_Immediate Decodability(小白书字符串专题)
Description Immediate Decodability An 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原创 2013-12-30 14:48:55 · 722 阅读 · 0 评论 -
UVa10010_Where's Waldorf?(小白书字符串专题)
Description 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 str原创 2013-12-30 14:40:36 · 828 阅读 · 0 评论 -
UVa10000_Longest Paths(最短路SPFA)
解题报告求最长路。用SPFA求最长路,初始化图为零,dis数组也为零#include #include #include #include #include #define inf 99999999#define N 110using namespace std;int mmap[N][N],dis[N],vis[N],n;void spfa(int s){原创 2014-07-24 14:27:07 · 1390 阅读 · 0 评论 -
UVa10878_Decode the tape(小白书字符串专题)
DescriptionProblem ADecode the tapeTime Limit: 1 second"Machines take me by surprise with great frequency."Alan TuringYour boss has just unearthed a roll of old c原创 2013-12-30 14:47:02 · 721 阅读 · 0 评论 -
UVA784_Maze Exploration(DFS)
Maze ExplorationTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluDescription Maze Exploration A maze of rectangular rooms is represented原创 2014-04-09 01:10:10 · 718 阅读 · 0 评论 -
UVa10082_WERTYU
10082 - WERTYUTime limit: 3.000 seconds原创 2014-06-10 21:18:38 · 820 阅读 · 0 评论 -
UVa272_TEX Quotes
272 - TEX QuotesTime limit: 3.000 secondsTeX is a typesetting language developed by Donald Knuth. It takes source text together with a few typesetting instructions and produces, one hopes, a bea原创 2014-06-10 20:37:35 · 486 阅读 · 0 评论 -
UVA291_The House Of Santa Claus(DFS)
In your childhood you most likely had to solve the riddle of the house of Santa Claus. Do you remember that the importance was on drawing the house in a stretch without lifting the pencil and not draw原创 2014-05-23 10:57:53 · 747 阅读 · 0 评论 -
UVa10115_Automatic Editing csdn(小白书字符串专题)
解题报告题意:替换字符串,一个单词可重复替换思路:这种题都很恶心。#include #include #include #include using namespace std;char str[1000][1000],ch[1000][1000],sh[1000],str1[1000];int main(){ int n,i,j; while(~原创 2014-07-31 21:50:47 · 1046 阅读 · 0 评论 -
UVa753/POJ1087_A Plug for UNIX(网络流最大流)(小白书图论专题)
解题报告题意:n个插头m个设备k种转换器。求有多少设备无法插入。思路:定义源点和汇点,源点和设备相连,容量为1.汇点和插头相连,容量也为1.插头和设备相连,容量也为1.可转换插头相连,容量也为inf(因为插头有无限个)#include #include #include #include #include #include #include #defi原创 2014-07-25 14:01:05 · 1375 阅读 · 0 评论 -
UVa10369/POJ2349_Arctic Network(最小生成树)(小白书图论专题)
Arctic NetworkTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 9323 Accepted: 3097DescriptionThe Department of National Defence (DND) wishes to connect s原创 2014-06-07 11:13:57 · 688 阅读 · 0 评论 -
UVa409_Excuses, Excuses!(小白书字符串专题)
解题报告字典树爆。#include #include #include using namespace std;int k,e,num[100],cnt;struct node{ int v; node *next[26];};node *newnode(){ node *p=new node; p->v=0; int i;原创 2014-07-31 20:38:17 · 976 阅读 · 0 评论 -
UVA439_Knight Moves(BFS)
Knight MovesTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluDescription A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to原创 2014-04-09 01:12:38 · 641 阅读 · 0 评论 -
UVA644_Immediate Decodability/HDU1671_Phone List(字典树)
Description Immediate Decodability An 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 sy原创 2014-02-18 18:55:28 · 883 阅读 · 0 评论 -
Steps
Description 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 smal原创 2013-12-30 13:32:09 · 826 阅读 · 0 评论 -
Quotient Polynomial
DescriptionProblem BQuotient PolynomialTime Limit2 SecondsA polynomial of degree n can be expressed asIf k is any integer then we can write:原创 2013-12-30 13:30:09 · 11825 阅读 · 0 评论 -
Marvelous Mazes
Description Marvelous Mazes Your mission, if you decide to accept it, is to create a maze drawing program. A maze will consist of the alphabetic characters A-Z, *(asterisk)原创 2013-12-30 15:14:00 · 582 阅读 · 0 评论 -
Secret Research
Description Secret Research At a certain laboratory results of secret research are thoroughly encrypted. A result of a single experiment is stored as an information of its原创 2013-12-30 14:21:36 · 632 阅读 · 0 评论 -
Simple calculations
Simple calculations The ProblemThere is a sequence of n+2 elements a0, a1,…, an+1 (n i 1000). It is known that ai = (ai–1 + ai+1)/2 – ci for each i=1, 2, ..., n. You are given a0, an原创 2013-12-30 14:00:33 · 463 阅读 · 0 评论 -
The Snail
Description The Snail A snail is at the bottom of a 6-foot well and wants to climb to the top. The snail can climb 3 feet while the sun is up, but slides down 1 fo原创 2013-12-30 13:27:07 · 6823 阅读 · 0 评论 -
(2/3/4)-D Sqr/Rects/Cubes/Boxes?
(2/3/4)-D Sqr/Rects/Cubes/Boxes?Input: standard inputOutput: standard outputTime Limit: 2 seconds You can see a (4x4) grid below. Can you tell me how many squares and rectangles are hidden t原创 2013-12-30 02:54:50 · 6562 阅读 · 0 评论 -
Rotating Sentences
Description Rotating Sentences In ``Rotating Sentences,'' you are asked to rotate a series of input sentences 90 degrees clockwise. So instead of displaying the input sente原创 2013-12-30 15:12:16 · 601 阅读 · 0 评论 -
Triangle Wave
Description Triangle Wave In this problem you are to generate a triangular wave form according to a specified pair of Amplitude and Frequency.Input and OutputThe input原创 2013-12-31 13:07:12 · 872 阅读 · 0 评论 -
Linear Cellular Automata
Description Linear Cellular Automata A biologist is experimenting with DNA modification of bacterial colonies being grown in a linear array of culture dishes. By changing t原创 2013-12-31 13:07:32 · 754 阅读 · 0 评论 -
The Collatz Sequence
Description The Collatz Sequence An algorithm given by Lothar Collatz produces sequences of integers, and is described as follows:Step 1:Choose an arbitrary positive int原创 2013-12-31 13:07:49 · 944 阅读 · 0 评论 -
Big Chocolate
Big ChocolateMohammad has recently visited Switzerland . As he loves his friends very much, he decided to buy some chocolate for them, but as this fine chocolate is very expensive(You know Moham原创 2013-12-30 13:41:18 · 506 阅读 · 0 评论 -
Power of Cryptography
Description Power of Cryptography BackgroundCurrent work in cryptography involves (among other things) large prime numbers and computing powers of numbers modulo func原创 2013-12-30 14:12:10 · 1115 阅读 · 0 评论 -
Ant on a Chessboard
Problem A.Ant on a Chessboard Background One day, an ant called Alice came to an M*M chessboard. She wanted to go around all the grids. So she began to walk along the chessboard acco原创 2013-12-30 14:17:25 · 628 阅读 · 0 评论 -
UVA10391_Compound Words/HDU1247_Hat's Words(字典树)
DescriptionCompound WordsYou are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is the concatenation of exactly two othe原创 2014-02-18 19:05:35 · 655 阅读 · 0 评论 -
Kindergarten Counting Game
Description Kindergarten Counting Game Everybody sit down in a circle. Ok. Listen to me carefully.``Woooooo, you scwewy wabbit!''Now, could someone tell me how many wor原创 2013-12-30 15:05:39 · 973 阅读 · 0 评论 -
The Decoder
Description The Decoder Write a complete program that will correctly decode a set of characters into a valid message. Your program should read a given file of a simple co原创 2013-12-30 15:03:45 · 537 阅读 · 0 评论 -
Ecological Premium
Ecological PremiumInput: standard inputOutput: standard outputTime Limit: 1 secondMemory Limit: 32 MBGerman farmers are given a premium depending on the conditions at their farmyard. Imagine原创 2013-12-30 15:02:05 · 584 阅读 · 0 评论 -
Back to High School Physics
Back to High School PhysicsInput: standard inputOutput: standard output A particle has initial velocity and constant acceleration. If its velocity after certain time is v then what will its di原创 2013-12-30 15:00:21 · 537 阅读 · 0 评论 -
Hashmat the Brave Warrior
Hashmat the brave warriorInput: standard inputOutput: standard output Hashmat is a brave warrior who with his group of young soldiers moves from one place to another to fight against his o原创 2013-12-30 14:59:33 · 745 阅读 · 0 评论 -
Artificial Intelligence?
Description Artificial Intelligence? Physics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupi原创 2013-12-30 14:45:11 · 997 阅读 · 0 评论 -
Integer Inquiry(大数加法)
Description Integer Inquiry One of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explo原创 2013-12-30 14:35:14 · 1097 阅读 · 0 评论 -
Box of Bricks
Description Box of Bricks Little Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different height. ``Look, I've built a原创 2013-12-30 14:25:51 · 643 阅读 · 0 评论