![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法竞赛入门
zxiaopp
这个作者很懒,什么都没留下…
展开
-
例题6-17 看图写树
#include #include #include using 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 · 488 阅读 · 0 评论 -
UVA 10391 Compound Words
You 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 other words in the dictionary. Input原创 2015-10-20 11:35:08 · 529 阅读 · 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 · 359 阅读 · 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 · 273 阅读 · 0 评论 -
UVA12096 The SetStack Computer
Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1071 Accepted: 219 Description Background from Wikipedia: "Set theory is a branch of mathematics creat原创 2015-08-05 15:13:39 · 541 阅读 · 0 评论 -
UVA400 Unix ls
G - Crawling in process... Crawling failed Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVA 400 Appoint description: System Cra原创 2015-08-05 17:47:11 · 486 阅读 · 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 · 470 阅读 · 0 评论 -
uva 1589Xiangqi
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4754 Accepted Submission(s): 1111 Problem Description Xiangqi is one of the m原创 2015-08-02 09:08:17 · 465 阅读 · 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 · 392 阅读 · 0 评论 -
UVA10976 Fractions Again?!
It is easy to see that for every fraction in the form 1 k (k > 0), we can always find two positive integers x and y, x ≥ y, such that: 1 k = 1 x + 1 y Now our question is: can you write原创 2015-08-28 09:37:48 · 529 阅读 · 0 评论 -
11059 - Maximum Product
Given a sequence of integers S = {S1, S2, . . . , Sn}, you should determine what is the value of the maximum positive product involving consecutive terms of S. If you cannot find a positive sequen原创 2015-08-28 09:00:50 · 395 阅读 · 0 评论 -
UVA 1588 Kickdown
Kickdown Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVA 1588 Appoint description: System Crawler (2015-07-13) Description A原创 2015-07-18 15:38:18 · 482 阅读 · 0 评论 -
UVA 232 Crossword Answers
Crossword Answers Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVA 232 Appoint description: System Crawler (2015-07-17) Description原创 2015-07-18 15:35:42 · 292 阅读 · 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 · 272 阅读 · 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 · 1507 阅读 · 0 评论 -
UVA 201 Squares
Squares Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVA 201 Appoint description: System Crawler (2015-07-21) Description A chi原创 2015-07-26 10:23:47 · 388 阅读 · 0 评论 -
习题3-7 DNA 序列
DNA Consensus String Time Limit: 1 Second Memory Limit: 32768 KB Figure 1. DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four原创 2015-03-23 18:46:45 · 938 阅读 · 0 评论 -
例题6-12 油田
#include #include using 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 · 507 阅读 · 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 · 548 阅读 · 0 评论