acm
文章平均质量分 79
新梦起航
这个作者很懒,什么都没留下…
展开
-
poj 1450---Gridland
GridlandTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 8258 Accepted: 4185DescriptionBackground For years, computer scientists have been trying to原创 2014-11-08 18:39:43 · 811 阅读 · 0 评论 -
E - Speed Limit(2.1.1)
DescriptionBill and Ted are taking a road trip. But the odometer in their car is broken, so they don't know how many miles they have driven. Fortunately, Bill has a working stopwatch, so they can原创 2014-07-14 10:40:51 · 417 阅读 · 0 评论 -
B - Ugly Numbers(1.5.8)
#include using namespace std;int main(){ int n,p,i,m2,m3,m5; int a[1505],t; while(cin>>n&&n!=0) { m2=0; m3=0; m5=0; a[0]=1; for(i原创 2014-07-14 10:04:43 · 537 阅读 · 0 评论 -
G - Self Numbers(2.2.1)
SubmitStatusDescriptionIn 1949 the Indian mathematician D.R. Kaprekar discovered a class of numbers called self-numbers. For any positive integer n, define d(n) to be n plus the sum of the dig原创 2014-07-14 19:43:09 · 425 阅读 · 0 评论 -
D - I Think I Need a Houseboat(1.3.1)
DescriptionFred 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 shrinkin原创 2014-07-13 20:40:48 · 440 阅读 · 0 评论 -
F - Humidex(1.4.2)
#include #include #include using namespace std;int main(){ char M=0,N=0; while(cin>>M && M!='E') { float m=0,n=0; cin>>m>>N>>n; if((M=='T' && N=='D'原创 2014-07-13 20:28:09 · 396 阅读 · 0 评论 -
E -What's Cryptanalysis?
Cryptanalysis is the process of breaking someone else's cryptographic writing. This sometimes involves some kind of statistical analysis of a passage of (encrypted) text. Your task is to write a pro原创 2014-07-25 17:45:55 · 891 阅读 · 0 评论 -
C - Maya Calendar
C - Maya CalendarTime Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionDuring his last sabbatical, professor M. A. Ya made a surpris原创 2014-07-25 10:16:25 · 578 阅读 · 0 评论 -
D - Factoring a Polynomial
D - Factoring a PolynomialTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionRecently Georgie has learned about polynomials. A po原创 2014-07-25 11:19:38 · 762 阅读 · 0 评论 -
D - A Stack or A Queue?
DescriptionDo you know stack and queue? They're both important data structures. A stack is a "first in last out" (FILO) data structure and a queue is a "first in first out" (FIFO) one. Here com原创 2014-07-23 15:49:25 · 516 阅读 · 0 评论 -
F - Ride to School(2.1.2)
DescriptionMany graduate students of Peking University are living in Wanliu Campus, which is 4.5 kilometers from the main campus – Yanyuan. Students in Wanliu have to either take a bus or ride a b原创 2014-07-14 16:59:08 · 592 阅读 · 0 评论 -
A - Red and Black(3.2.1)
DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent til原创 2014-07-15 16:43:02 · 486 阅读 · 0 评论 -
A - Zipper
A - ZipperTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionGiven three strings, you are to determine whether the third string c原创 2014-08-11 11:14:54 · 839 阅读 · 0 评论 -
C - Message Decowding
C - Message DecowdingTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThe cows are thrilled because they've just learned about原创 2014-08-11 16:27:00 · 1037 阅读 · 0 评论 -
B - Inglish-Number Translator
B - Inglish-Number TranslatorTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionIn this problem, you will be given one or more in原创 2014-08-11 14:46:36 · 1456 阅读 · 0 评论 -
I - The 3n + 1 problem(2.4.2)
DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an a原创 2014-07-14 15:44:04 · 508 阅读 · 0 评论 -
B - Symmetric Order(3.3.1)
DescriptionIn your job at Albatross Circus Management (yes, it's run by a bunch of clowns), you have just finished writing a program whose output is a list of names in nondescending order by lengt原创 2014-07-15 18:06:13 · 499 阅读 · 0 评论 -
H - Quicksum(1.5.3)
DescriptionA checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum will also change, so checksums are often us原创 2014-07-13 20:07:59 · 371 阅读 · 0 评论 -
I - Dirichlet's Theorem on Arithmetic Progressions(1.5.5)
#include #include using namespace std;bool prime(int n){ int i; double m; m=sqrt(double(n)); if(n==1) return 0; for(i=2;i { if(n%i==0) break; } if(i>m)原创 2014-07-13 20:03:50 · 418 阅读 · 0 评论 -
J - Vertical Histogram(1.5.7)
DescriptionWrite a program to read four lines of upper case (i.e., all CAPITAL LETTERS) text input (no more than 72 characters per line) from the input file and print a vertical histogram that sho原创 2014-07-13 20:01:49 · 591 阅读 · 0 评论 -
G - Specialized Four-Digit Numbers(1.5.2)
DescriptionFind and list all four-digit numbers in decimal notation that have the property that the sum of its four digits equals the sum of its digits when represented in hexadecimal (base 16) no原创 2014-07-13 20:23:50 · 512 阅读 · 0 评论 -
C - Ultra-QuickSort(7.2.2)(7.2应用排序算法编程的实验范例)
DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the seq原创 2014-07-23 08:53:33 · 659 阅读 · 0 评论 -
A - Hardwood Species(7.1.1)(利用STL中自带的排序功能编程的实验范例)
DescriptionHardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally go dormant in the winter.America's temperate climates produce forests with h原创 2014-07-23 08:57:00 · 582 阅读 · 0 评论 -
hdu 不容易系列之(4)——考新郎
不容易系列之(4)——考新郎 Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 37 Accepted Submission(s) : 8Font: Times New Roman | Verdana | GeorgiaF原创 2014-04-04 18:12:05 · 454 阅读 · 0 评论 -
hdu Number Sequence
Number Sequence Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 50 Accepted Submission(s) : 10Font: Times New Roman | Verdana | Georgia原创 2014-04-04 16:26:30 · 458 阅读 · 0 评论 -
hdu 神、上帝以及老天爷
神、上帝以及老天爷 Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 7 Accepted Submission(s) : 5Font: Times New Roman | Verdana | Georgia Font S原创 2014-04-03 17:18:23 · 496 阅读 · 0 评论 -
hdu 人见人爱A^B
人见人爱A^BTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 20391 Accepted Submission(s): 14204Problem Description求A^B的最后三位数表示的整数。说明:A原创 2014-03-22 09:01:21 · 633 阅读 · 0 评论 -
hdu Rightmost Digit
Rightmost DigitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 29473 Accepted Submission(s): 11243Problem DescriptionGiven a po原创 2014-03-21 17:21:20 · 492 阅读 · 0 评论 -
hdu A Mathematical Curiosity
A Mathematical CuriosityTime Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 87 Accepted Submission(s) : 23Font: Times New Roman | Verdana | Ge原创 2014-05-01 16:03:20 · 494 阅读 · 0 评论 -
hdu Children's queue
Children’s Queue Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 75 Accepted Submission(s) : 19Font: Times New Roman | Verdana | Georgia原创 2014-03-29 00:00:18 · 932 阅读 · 0 评论 -
hdu 母牛的故事
母牛的故事 Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 44 Accepted Submission(s) : 35Font: Times New Roman | Verdana | GeorgiaFont Size原创 2014-03-29 10:35:16 · 606 阅读 · 0 评论 -
C - Fractal(3.4.1)
DescriptionA fractal is an object or quantity that displays self-similarity, in a somewhat technical sense, on all scales. The object need not exhibit exactly the same structure at all scales, but原创 2014-07-16 10:11:46 · 509 阅读 · 0 评论 -
B - Adding Reversed Numbers
DescriptionThe Antique Comedians of Malidinesia prefer comedies to tragedies. Unfortunately, most of the ancient plays are tragedies. Therefore the dramatic advisor of ACM has decided to transfigure原创 2014-07-16 19:29:58 · 541 阅读 · 0 评论 -
A - Babelfish(6.1.2)(6.1使用词典解题实验范例)
SubmitStatusDescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help yo原创 2014-07-22 15:41:57 · 508 阅读 · 0 评论 -
A - Sum(1.5.1)
DescriptionYour task is to find the sum of all integer numberslying between 1 andN inclusive.InputThe input consists of a single integer N that isnot greater than 10000 by it's原创 2014-07-17 15:06:08 · 448 阅读 · 0 评论 -
C - Modular multiplication of polynomials
DescriptionConsider polynomials whose coefficients are 0 and 1. Addition of two polynomials is achieved by 'adding' the coefficients for the corresponding powers in the polynomials. The addition o原创 2014-07-20 17:29:30 · 700 阅读 · 1 评论 -
C - 排列(1.5.9)
Description题目描述:大家知道,给出正整数n,则1到n这n个数可以构成n!种排列,把这些排列按照从小到大的顺序(字典顺序)列出,如n=3时,列出1 2 3,1 3 2,2 1 3,2 3 1,3 1 2,3 2 1六个排列。任务描述:给出某个排列,求出这个排列的下k个排列,如果遇到最后一个排列,则下1排列为第1个排列,即排列1 2 3…n。比如:n = 3,k原创 2014-07-15 14:34:29 · 759 阅读 · 0 评论 -
Blue Jeans
DescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to map how the Earth w原创 2014-07-20 13:47:00 · 477 阅读 · 0 评论 -
E - Hangover(1.4.1)
DescriptionHow 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 perpendic原创 2014-07-13 20:32:59 · 970 阅读 · 0 评论 -
C - Sum of Consecutive Prime Numbers(1.2.2)
//先打素数的表#include #include using namespace std;const int maxp=200,n=10000;int prime[maxp],total=0;bool isprime(int n1){ int k; for(int i=0;i { if(n1%prime[i]==0)原创 2014-07-17 18:18:33 · 532 阅读 · 0 评论