UVa
文章平均质量分 83
江枭
努力中希望在ACM路上走好
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
UVa11995 I Can Guess the Data Structure!
Problem I I Can Guess the Data Structure! There is a bag-like data structure, supporting two operations: 1 x Throw an element x into the bag. 2 Take out an element from the bag. Given a seq原创 2013-08-17 21:42:47 · 801 阅读 · 0 评论 -
UVa488 Triangle Wave
Triangle Wave In this problem you are to generate a triangular wave form according to a specified pair ofAmplitude and Frequency. Input and Output The input begins with a single positive i原创 2013-08-07 08:49:42 · 1063 阅读 · 0 评论 -
UVa458 The Decoder
The Decoder Write a complete program that will correctly decode a set ofcharacters into a valid message. Your program shouldread a given file of a simple coded set of characters and print原创 2013-08-07 08:45:21 · 758 阅读 · 0 评论 -
UVa10071 Back to High School Physics
Problem B Back to High School Physics Input: standard input Output: standard output A particle has initial velocity and constant acceleration. Ifits velocity after certain time is v then what w原创 2013-08-07 09:17:34 · 744 阅读 · 0 评论 -
UVa489 Hangman Judge
Hangman Judge In ``Hangman Judge,'' you are to write a program that judges a series of Hangman games. Foreach game, the answer to the puzzle is given as well as the guesses. Rules are the原创 2013-08-07 08:58:53 · 598 阅读 · 0 评论 -
UVa414 Machined Surfaces
Machined Surfaces An imaging device furnishes digital images of two machined surfaces thateventually will be assembled incontact with each other. The roughness of this final contact is t原创 2013-08-06 21:40:16 · 3968 阅读 · 0 评论 -
UVa10055 Hashmat the Brave Warrior
Problem A Hashmat the brave warrior Input: standard input Output: standard output Hashmat is a brave warrior whowith his group of young soldiers moves from one place to another to fightagains原创 2013-08-06 21:34:07 · 761 阅读 · 0 评论 -
UVa694 The Collatz Sequence
The Collatz Sequence An algorithm given by Lothar Collatz produces sequences of integers, and isdescribed as follows: Step 1:Choose an arbitrary positive integer A as the first item int原创 2013-08-06 22:03:42 · 755 阅读 · 0 评论 -
UVa457 Linear Cellular Automata
Linear Cellular Automata A biologist is experimenting with DNA modification ofbacterial colonies being grown in a linear array of culture dishes. Bychanging the DNA, he is able ``program" th原创 2013-08-06 21:57:10 · 677 阅读 · 0 评论 -
UVa10879 Code Refactoring
Problem B Code Refactoring Time Limit: 2 seconds "Harry, my dream is a code waiting to be broken. Break the code, solve the crime." Agent Cooper Several algorithms in modern crypto原创 2013-08-05 19:08:43 · 647 阅读 · 0 评论 -
UVa10815 Andy's First Dictionary
ProblemB: Andy's First Dictionary Timelimit: 3 seconds Andy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of word原创 2013-08-05 19:04:24 · 798 阅读 · 0 评论 -
UVa10420 List of Conquests
Problem B List of Conquests Input:standardinput Output: standard output Time Limit: 2 seconds In Act I, Leporello is tellingDonna Elvira about his master's long list of conquests: ``This is th原创 2013-08-05 16:55:31 · 819 阅读 · 0 评论 -
UVa10194 Football (aka Soccer)
Problem A: Football (aka Soccer) The Problem Football the most popular sport in the world (americans insist to call it "Soccer",but we will call it "Football"). As everyone knows, Brasi原创 2013-08-05 16:40:41 · 739 阅读 · 0 评论 -
UVa490 Rotating Sentences
Rotating Sentences In ``Rotating Sentences,'' you are asked to rotate a series of input sentences 90 degrees clockwise.So instead of displaying the input sentences from left to right and t原创 2013-08-07 09:05:53 · 791 阅读 · 0 评论 -
UVa494 Kindergarten Counting Game
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 words I just said? Input and原创 2013-08-07 09:12:28 · 640 阅读 · 0 评论 -
UVa10115 Automatic Editing
Problem E: Automatic Editing Source file: autoedit.{c, cpp, java, pas} Input file: autoedit.in Output file: autoedit.out Text-processing tools like awk and sed allow y原创 2013-08-17 21:19:54 · 682 阅读 · 0 评论 -
UVa10361 Automatic Poetry
Problem I Automatic Poetry Input: standard input Output: standard output Time Limit: 2 seconds Memory Limit: 32 MB “Oh God”, Lara Croft exclaims, “it’s one of these dumb riddles again!”原创 2013-08-17 21:27:50 · 663 阅读 · 0 评论 -
UVa10010 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 o原创 2013-08-17 21:06:57 · 1096 阅读 · 0 评论 -
UVa10878 Decode the tape
Problem A Decode the tape Time Limit: 1 second "Machines take me by surprise with great frequency." Alan Turing Your boss has just unearthed a roll of old computer tapes. The tape原创 2013-08-17 21:36:09 · 876 阅读 · 0 评论 -
UVa10106 Product
Product The Problem The problem is to multiply two integers X, Y. (0250) The Input The input will consist of a set of pairs of lines. Each line in pair contains one multiplyer. The原创 2013-08-17 21:12:06 · 671 阅读 · 0 评论 -
UVa644 Immediate Decodability
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. We will assume for this p原创 2013-08-17 21:02:17 · 691 阅读 · 0 评论 -
UVa401 Palindromes
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 because it is the same when t原创 2013-08-17 20:14:39 · 721 阅读 · 0 评论 -
UVa537 Artificial Intelligence?
Artificial Intelligence? Physics 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 underst原创 2013-08-17 20:50:09 · 791 阅读 · 0 评论 -
UVa465 Overflow
Overflow Write a program that reads an expression consisting of two non-negative integer and an operator. Determine if either integer or the result of the expression is too large to be r原创 2013-08-17 20:45:06 · 919 阅读 · 0 评论 -
UVa424 Integer Inquiry
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 explored taking various sums of t原创 2013-08-17 20:30:32 · 731 阅读 · 0 评论 -
UVa409 Excuses, Excuses!
Excuses, Excuses! Judge 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原创 2013-08-17 20:24:39 · 644 阅读 · 0 评论 -
UVa10300 Ecological Premium
Problem A Ecological Premium Input: standard input Output: standard output Time Limit: 1 second Memory Limit: 32 MB German farmers are given a premium depending onthe conditions at their farmyar原创 2013-08-07 09:20:43 · 875 阅读 · 0 评论 -
UVa10110 Light, more light
Light,more light The Problem There is man named "mabu" for switching on-off light in our University.He switches on-off the lights in a corridor. Every bulb has its own toggle switch. That is原创 2013-08-05 16:18:25 · 1078 阅读 · 0 评论 -
UVa568 Just the Facts
Just the Facts The expression N!, read as ``N factorial," denotes the product of the firstN positive integers, where N is nonnegative. So, for example, N N! 0 1 1原创 2013-08-05 11:09:31 · 759 阅读 · 0 评论 -
UVa10061 How many zeros and how many digits?
Problem G How many zeros and how many digits? Input: standard input Output: standard output Given a decimal integer number you willhave to find out how many trailing zeros will be there in its原创 2013-08-05 16:05:31 · 1121 阅读 · 0 评论 -
UVa10474 Where is the Marble?
水题,排序后就能找到了。#include #include using namespace std; const int N = 10000; int s[N]; int p; int cmp(const void *a,const void *b){ return *(int*)a - *(int*)b; } int main(){ int n; int q; int num =原创 2013-07-24 10:49:20 · 624 阅读 · 0 评论 -
UVa10305 Ordering Tasks
拓扑排序,用递归判断。#include #include using namespace std; const int N = 102; int g[N][N]; int c[N]; int topo[N]; int t; int n,m; bool dfs(int u){ c[u] = -1; for (int v = 1; v <= n; v++){ if (g[u][v]){原创 2013-07-18 16:31:01 · 591 阅读 · 0 评论 -
UVa575 Skew Binary
水题,套公式吧。#include #include #include using namespace std; const int N = 40; int num[N]; char str[N]; int ans; int main() { while (cin >> str) { if (strcmp(str,"0") == 0) break; ans = 0; i原创 2013-07-24 10:38:03 · 539 阅读 · 0 评论 -
UVa579 ClockHands
水题,angle = 30 * hour - 5.5 * minute。#include #include using namespace std; int main() { double h; double m; double angle; while (scanf("%lf:%lf",&h,&m)) { if (h == 0 && m == 0) break; an原创 2013-07-24 10:42:20 · 538 阅读 · 0 评论 -
UVa350 Pseudo-Random Numbers
简单数论题,循环套公式直到等于初始值跳出。#include #include using namespace std; const int N = 100000; int s[N]; int main() { int Z,I,M,L; int cnt = 0; while (cin >> Z >> I >> M >> L) { if (Z + I + M + L == 0)原创 2013-07-31 21:02:20 · 656 阅读 · 0 评论 -
UVa748 Exponentiation
高精度乘法,恶心,太久没做这种题了,结果好几天才出来。基本都是去除前导0后导0和小数点,然后由字符串转换为整形再计算。#include #include using namespace std; const int N = 200; const int M = 10; char ch_num[M]; int power; int num1[N]; int num2[N]; int ans[原创 2013-07-24 10:22:14 · 723 阅读 · 0 评论 -
UVa699 The Falling Leaves
这题是主要是通过建树,然后把对于每个节点的位置,从根开始,是左节点就-1,右节点就+1,然后把各个位置节点的权值累加即可。 #include #include #include using namespace std; const int N = 1000; int result[N] = {0}; int p = 1; struct tree{ int place; tree *left原创 2013-07-18 16:09:27 · 483 阅读 · 0 评论 -
UVa729 The Hamming Distance Problem
全排列,水题,用STL里面next_permutation()函数即可。#include #include #include using namespace std; const int N = 25; char s[N]; int main(){ int t; cin >> t; while (t--){ memset(s,0,sizeof(s)); int n; int原创 2013-07-18 16:11:21 · 603 阅读 · 0 评论 -
UVa152 Tree's a Crowd
这题目有点坑爹,要求各点到其他点的最近距离,开始以为像0.1、0.2这种的是视为1的,后面才知道是按四舍五入的,其他就没什么难度了。#include #include #include #include #include using namespace std; const int N = 5100; const int INF = 1 << 29; struct Node { d原创 2013-07-31 20:37:46 · 557 阅读 · 0 评论 -
UVa10054 The Necklace
欧拉回路问题,并查集确定联通,判断节点度数是否为偶数判断构成欧拉回路,递归后输出结果。 #include #include using namespace std; const int MAX = 51; int T; int N; int graph[MAX][MAX]; int degree[MAX]; int parent[MAX]; void initialize(); int anc原创 2013-07-18 16:15:24 · 652 阅读 · 0 评论
分享