
算法竞赛入门
zxiaopp
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
例题6-17 看图写树
#include#include#includeusing namespace std;char a[100][100];void dfs(int r,int c){ printf("%c(",a[r][c]); if(a[r+1][c]=='|') { int i=c; while(i>0) { if(a[r+2][i-1]=='-')原创 2015-03-26 15:16:35 · 529 阅读 · 0 评论 -
UVA 10391 Compound Words
You are to find all the two-word compound words in a dictionary. A two-word compound word is aword in the dictionary that is the concatenation of exactly two other words in the dictionary.Input原创 2015-10-20 11:35:08 · 598 阅读 · 0 评论 -
uva 725Division
Write a program that finds and displays all pairs of 5-digit numbers that between them use the digits 0through 9 once each, such that the first number divided by the second原创 2015-08-21 19:06:23 · 389 阅读 · 0 评论 -
UVA673 Parentheses Balance
Parentheses Balance You are given a string consisting of parentheses () and []. A string of this type is said to be correct:(a)if it is the empty string(b)if A and B are c原创 2015-08-20 09:05:26 · 301 阅读 · 0 评论 -
UVA12096 The SetStack Computer
Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1071 Accepted: 219DescriptionBackground from Wikipedia: "Set theory is a branch of mathematics creat原创 2015-08-05 15:13:39 · 584 阅读 · 0 评论 -
UVA400 Unix ls
G - Crawling in process...Crawling failedTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmitStatus Practice UVA 400 Appoint description:System Cra原创 2015-08-05 17:47:11 · 524 阅读 · 0 评论 -
1599 - Ideal Path
New labyrinth attraction is open in New Lostland amusement park. The labyrinth consists of n rooms connected by m passages. Each passage is colored into some color ci. Visitors of the labyrinth原创 2015-09-07 17:08:27 · 524 阅读 · 0 评论 -
uva 1589Xiangqi
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4754 Accepted Submission(s): 1111Problem DescriptionXiangqi is one of the m原创 2015-08-02 09:08:17 · 510 阅读 · 0 评论 -
UVA 1590 - IP Networks
Alex is administrator of IP networks. His clients have a bunch of individual IP addresses and he decided to group all those IP addresses into the smallest possible IP network.Each IP address is原创 2015-08-03 12:05:10 · 436 阅读 · 0 评论 -
UVA10976 Fractions Again?!
It is easy to see that for every fraction in the form 1k(k > 0), we can always find two positive integersx and y, x ≥ y, such that:1k=1x+1yNow our question is: can you write原创 2015-08-28 09:37:48 · 568 阅读 · 0 评论 -
11059 - Maximum Product
Given a sequence of integers S = {S1, S2, . . . , Sn}, you should determine what is the value of themaximum positive product involving consecutive terms of S. If you cannot find a positive sequen原创 2015-08-28 09:00:50 · 445 阅读 · 0 评论 -
UVA 1588 Kickdown
KickdownTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVA 1588Appoint description: System Crawler (2015-07-13)DescriptionA原创 2015-07-18 15:38:18 · 516 阅读 · 0 评论 -
UVA 232 Crossword Answers
Crossword AnswersTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVA 232Appoint description: System Crawler (2015-07-17)Description原创 2015-07-18 15:35:42 · 321 阅读 · 0 评论 -
UVA 489 Hangman Judge
In ``Hangman Judge,'' you are to write a program that judges a series of Hangman games. For each game, the answer to the puzzle is given as well as the guesses. Rules are t原创 2015-07-29 10:06:32 · 300 阅读 · 0 评论 -
UVA 1593 Alignment of Code
You are working in a team that writes Incredibly Customizable Programming Codewriter (ICPC) which is basically a text editor with bells and whistles. You are working on a module that takes a piece原创 2015-08-08 10:44:58 · 1552 阅读 · 0 评论 -
UVA 201 Squares
SquaresTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVA 201Appoint description: System Crawler (2015-07-21)DescriptionA chi原创 2015-07-26 10:23:47 · 418 阅读 · 0 评论 -
习题3-7 DNA 序列
DNA Consensus StringTime Limit: 1 Second Memory Limit: 32768 KBFigure 1.DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four原创 2015-03-23 18:46:45 · 1039 阅读 · 0 评论 -
例题6-12 油田
#include#includeusing namespace std;char a[100][100];int b[100][100]; int m,n;void dfs(int ic,int jc,int id){ if(icm||jc>n) return; if(b[ic][jc]||a[ic][jc]!='@')return ; b[ic][jc]=id; for(原创 2015-03-23 15:28:16 · 536 阅读 · 0 评论 -
UVA 10539 Almost Prime Numbers
Almost prime numbers are the non-prime numbers which are divisible by only a single prime number.In this problem your job is to write a program which finds out the number of almost prime numbers原创 2015-10-20 14:45:03 · 594 阅读 · 0 评论