![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
我的ACM
文章平均质量分 77
书虫
地理信息系统专业研究生
展开
-
Gene Assembly
Time Limit: 1 Second Memory Limit: 32768 KB <br />Statement of the Problem <br />With the large amount of genomic DNA sequence data being made available, it is becoming more important to find genes (parts of the genomic DNA which are responsible for原创 2011-02-23 15:17:00 · 1103 阅读 · 0 评论 -
Tick and Tick
Problem Description The three hands of the clock are rotating every second and meeting each other many times everyday. Finally, they get bored of this and each of them would like to stay away from the other two. A hand is happy if it is at least D degrees原创 2010-11-24 19:52:00 · 1916 阅读 · 2 评论 -
Number Sequence
Problem DescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the value of f(n). InputThe input consists of multiple test cases. Each test case contains 3 i原创 2010-11-24 17:22:00 · 570 阅读 · 0 评论 -
A + B Problem II
Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.<br /> <br /> InputThe first line of the input contains an integer T(1<=T<=20) which means the number of test cases. Then T lines原创 2010-11-24 17:15:00 · 805 阅读 · 0 评论 -
u Calculate e
Problem DescriptionA simple mathematical formula for e is<br />e = sum((1/i!) i is from 0 to n<br /><br />where n is allowed to go to infinity. This can actually yield very accurate approximations of e using relatively small values of n.<br /> <br /><br原创 2010-11-26 19:04:00 · 1128 阅读 · 0 评论 -
Tempter of the Bone
Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone was a trap, and he tried desperately原创 2010-11-26 18:58:00 · 538 阅读 · 0 评论 -
Elevator
Problem DescriptionThe highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floo原创 2010-11-25 22:14:00 · 744 阅读 · 0 评论 -
Eight八位数问题2
通过程序的多次运行计算,发现此题可能有多个解!例如:2 3 4 1 5 x 7 6 8发现有以下三个解都符合要求:ullddrurdllurrdlurddlurullddrurdllurdrullddrurdllurdruldr所以大家在做的时候要注意,不一定是你的代码有问题,而是问题描述时没有说清楚!好了,上一文章中重点介绍了该题目基于双广的解决方法,在这里我将继续介绍基于A*算法,即最优启发性算法的解法!首先,介绍下A*算法的基本知识。(以下蓝色字是来源于:http://dev.gameres.com/原创 2010-12-13 19:23:00 · 775 阅读 · 0 评论 -
Eight八位数问题
Problem DescriptionThe 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, and all packed into a 4 by 4 frame with one tile mi原创 2010-12-12 09:44:00 · 2858 阅读 · 2 评论 -
笨笨的我
<br />呵呵,今天才发现csdn能够插入代码显示!O(∩_∩)O~笨笨的我,傻傻的我!原创 2010-12-10 23:33:00 · 526 阅读 · 0 评论 -
Easier Done Than Said?
Problem DescriptionPassword security is a tricky thing. Users prefer simple passwords that are easy to remember (like buddy), but such passwords are often insecure. Some sites use random computer-generated passwords (like xvtpzyo), but users have a hard ti原创 2010-12-09 21:20:00 · 845 阅读 · 0 评论 -
Average is not Fast Enough!
Problem DescriptionA relay is a race for two or more teams of runners. Each member of a team runs one section of the race. Your task is to help to evaluate the results of a relay race. You have to process several teams. For each team you are given a list w原创 2010-12-09 20:00:00 · 609 阅读 · 0 评论 -
Robot Motion
Problem DescriptionA robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instructions are N north (up the page)S south (down the page)E east (to th原创 2010-12-09 18:49:00 · 1033 阅读 · 0 评论 -
Max Sum
Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5 + 4 = 14. InputThe first line of the input contains an inte原创 2010-11-24 17:18:00 · 414 阅读 · 0 评论 -
Let the Balloon Rise
Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color and fin原创 2010-11-24 17:20:00 · 663 阅读 · 0 评论 -
Human Gene Functions
<br /> <br /> Time Limit: 1 Second Memory Limit: 32768 KB <br />It is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simply denoted by four letters, A, C, G, and T. Biologists have been intere原创 2011-02-23 13:24:00 · 698 阅读 · 0 评论 -
Gridland
Time Limit: 1 Second Memory Limit: 32768 KB BackgroundFor years, computer scientists have been trying to find efficient solutions to different computing problems. For some of them efficient algorithms are already available, these are the "easy" prob原创 2011-02-23 09:21:00 · 2106 阅读 · 0 评论 -
Pi
Time Limit: 1 Second Memory Limit: 32768 KB <br />Professor Robert A. J. Matthews of the Applied Mathematics and Computer Science Department at the University of Aston in Birmingham, England has recently described how the positions of stars across t原创 2011-02-13 10:23:00 · 718 阅读 · 0 评论 -
Game Prediction
<br />Time limit: 1 Seconds Memory limit: 32768K <br />Total Submit: 149 Accepted Submit: 112 <br />Suppose there are M people, including you, playing a special card game. At the beginning, each player receives N cards. The pip of a card is a positiv原创 2011-02-15 09:31:00 · 687 阅读 · 0 评论 -
The Drunk Jailer
Time Limit: 1 Second Memory Limit: 32768 KB <br />A certain prison contains a long hall of n cells, each right next to each other. Each cell has a prisoner in it, and each cell is locked. <br />One night, the jailer gets bored and decides to play a原创 2011-02-13 12:51:00 · 742 阅读 · 0 评论 -
Basically Speaking
<br /> The Really Neato Calculator Company, Inc. has recently hired your team to help design their Super Neato Model I calculator. As a computer scientist you suggested to the company that it would be neato if this new calculator could convert among number原创 2011-02-13 09:57:00 · 1393 阅读 · 0 评论 -
Flip and Shift
<br />This puzzle consists of a random sequence of m black disks and n white disks on an oval-shaped track, with a turnstile capable of flipping (i.e., reversing) three consecutive disks. In Figure 1, there are 8 black disks and 10 white disks on the track原创 2011-02-11 17:09:00 · 670 阅读 · 0 评论 -
HangOver
<br />How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular to the table.) With two cards you can make the top card overha原创 2011-02-10 17:18:00 · 829 阅读 · 0 评论 -
I Think I Need a Houseboat
<br /><br />Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by 50 square miles each year, due to erosion caused by th原创 2011-02-10 18:17:00 · 504 阅读 · 0 评论 -
Numerical Summation of a Series
Produce a table of the values of the series Equation 1for the 2001 values of x, x= 0.000, 0.001, 0.002, ..., 2.000. All entries of the table must have an absolute error less than 0.5e-12 (12 digits of precision). This problem is based on a problem from H原创 2011-02-10 15:26:00 · 1913 阅读 · 0 评论 -
Monkey and Banana
Time Limit: 1 Second Memory Limit: 32768 KB <br />A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the mon原创 2011-02-24 13:19:00 · 821 阅读 · 0 评论 -
Quoit Design
Problem DescriptionHave you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded.In the field of Cyberground, the position of each toy is fixed, and the ring is carefully desig原创 2010-11-25 22:10:00 · 1758 阅读 · 0 评论 -
Design T-Shirt
Problem DescriptionSoon after he decided to design a T-shirt for our Algorithm Board on Free-City BBS, XKA found that he was trapped by all kinds of suggestions from everyone on the board. It is indeed a mission-impossible to have everybody perfectly satis原创 2010-12-08 17:11:00 · 805 阅读 · 0 评论 -
Computer Transformation
Problem DescriptionA sequence consisting of one digit, the number 1 is initially written into a computer. At each successive time step, the computer simultaneously tranforms each digit 0 into the sequence 1 0 and each digit 1 into the sequence 0 1. So, aft原创 2010-12-10 23:32:00 · 1005 阅读 · 0 评论 -
N!
Problem DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N! InputOne N in one line, process to the end of file. OutputFor each N, output N! in one line. Sample Input123 Sample Output126 AuthorJGShining(极光炫影)分析: 要注意时间限制,特别当位原创 2010-12-10 13:37:00 · 516 阅读 · 0 评论 -
Max Sum Plus Plus
Problem DescriptionNow I think you have got an AC in Ignatius.L's "Max Sum" problem. To be a brave ACMer, we always challenge ourselves to more difficult problems. Now you are faced with a more difficult problem.Given a consecutive number sequence S1, S2,原创 2010-12-02 19:28:00 · 566 阅读 · 0 评论 -
Train Problem I
Problem DescriptionAs the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is the fastest all over the world ^v^). But here comes a probl原创 2010-12-01 22:46:00 · 699 阅读 · 0 评论 -
Least Common Multiple
Problem DescriptionThe least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 15 is 105.<br /><br /> <br /> InputInput will consist of mu原创 2010-12-01 20:36:00 · 436 阅读 · 0 评论 -
Big Number
Problem DescriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are given a number, you have to determine the number of digits原创 2010-12-01 20:33:00 · 338 阅读 · 0 评论 -
Encoding
Problem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method: <br /><br />1. Each sub-string containing k same characters should be encoded to "kX" where "X" is the only character in this sub-string.<br /><br /原创 2010-12-01 20:19:00 · 359 阅读 · 0 评论 -
Fibonacci Again
Problem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).<br /> <br /> InputInput consists of a sequence of lines, each containing an integer n. (n < 1,000,000).<br /> <br /> OutputPrint the word "y原创 2010-12-01 19:55:00 · 1139 阅读 · 0 评论 -
Digital Roots
Problem DescriptionThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting value contains two or more digits, those digits are summ原创 2010-12-01 19:32:00 · 502 阅读 · 0 评论 -
A Mathematical Curiosity
Problem DescriptionGiven two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an integer.<br /><br />This problem contains multiple test cases!<br /><br />The first line of a multiple input is a原创 2010-12-01 19:30:00 · 797 阅读 · 0 评论 -
Prime Ring Problem
<br /> Problem DescriptionA ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime.<br /><br />Note: the number of first circle should原创 2010-12-01 19:14:00 · 319 阅读 · 0 评论 -
Safecracker
Problem Description=== Op tech briefing, 2002/11/02 06:42 CST === <br />"The item is locked in a Klein safe behind a painting in the second-floor library. Klein safes are extremely rare; most of them, along with Klein and his factory, were destroyed in Wor原创 2010-12-01 19:05:00 · 452 阅读 · 0 评论