Label: style blog color Io AR for SP Div
1 #include
Gets stops when it encounters a carriage return, and changes the carriage return to '\ 0' to save it to a string. Note: If the input number is too long, this function may cause problems because it does not judge the input length.
As long as the first '\ 0' is encountered, puts will output and automatically output a line break.
Format: This format is not a big problem. If it is 0, it will end, instead of outputting a line feed.
Idea
HDU 4864 (Multi-school) 1004 tasksProblem DescriptionToday the company has m tasks to complete. the ith task need xi minutes to complete. meanwhile, this task has a difficulty level yi. the machine whose level below this task's level yi cannot complete this task. if the company completes this task, they will get (500 * xi + 2 * yi) dollars.The company has n machines. each machine has a maximum working time and a level. if the time for the task is more
Problem DTime limit:3000/1000ms (java/other) Memory limit:65535/32768k (Java/other) total submission (s): 945 AccepTed Submission (s): 121font:times New Roman |Verdana | Georgiafont Size:←→problem Description A bank recently issued a new denomination of 4 banknotes, so now there are 5 yellowDenominations of banknotes, respectively, are 20,10,5,4,1. But the constant is his petty (same title 2), nowThere are a lot of people to collect money, yellow and unhappy, please figure out every person to co
http://acm.hdu.edu.cn/showproblem.php?pid=1004Let the Balloon RiseTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 90418 Accepted Submission (s): 34348Problem Descriptioncontest Time again! How excited it was to see balloons floating around. But to tell you a secret, the judges ' favorite time was guessing the most popular problem. When the contest was over, they would count the balloons of each color and find the result.This is the year that t
Financial Management
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 165700
Accepted: 61629
DescriptionLarry graduated this, and finally has a job. He's making a lot of money, but somehow never seems to has enough. Larry has decided the he needs to grab hold of his financial portfolio and solve his financing problems. The first step is to a figure out what's been going on with the he money. Larry has the He bank account s
Read the names, student numbers and grades of n students, respectively, and output the highest and lowest grade students ' names and school numbers.input Format: each test input contains 1 test cases in the format Line 1th: Positive integer n 2nd line: 1th Student's name School number results 3rd line: 2nd Student's name study number score ... Line n+1: Nth Student's name number scoreWhere both the name and the school number are not more than 10 characters of the string, the score is an inte
The problem can be dealt with by simulation. The first thing to understand is that one of the properties of an XOR operation is the same number of different or two times without effect. Open two arrays, the number of the first a in the number of I, and the other B array to remove all the numbers except for the number of I, as the result of the calculation of the problem. The first value of sum is then computed. Each modification J will be a[j] modified, then b[j]^sum, update B[j], in the calcula
1 Code:#include Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.HDU 1004 Let the Balloon Rise (STL)
, because my code enumeration to 1000000000 takes more than 30 seconds, online there are many other methods, but mostly C + + implementation. This also reflects the great advantages of CPP in solving algorithmic contests, and there are places where we can improve such as the first number of 2,4,6,8,5 does not need us to fold, because they are certainly not prime. So these places can be optimized, but my current code structure seems to be unable to do this optimization. I hope someone can write t
#include #include Char a[1000][16];//to create a two-dimensional arraystatic int b[1000];//establishes the number of occurrences of the stored corresponding stringint main (){int i,j,max,n,m;while (scanf ("%d", n)!=eof) {GetChar ();if (n==0) break;for (i=1;i{b[i]=0;scanf ("%s", A[i]);}for (i=1;i{for (j=1;j{if (strcmp (A[i],a[j]) ==0)b[i]++;}}M=1;MAX=B[1];for (i=2;i{if (B[i]>max){Max=b[i];M=i;}}printf ("%s\n", A[m]);}return 0;}Hangzhou Electric 1004
HDU 5327 5328 5335#include #include #pragma COMMENT (linker, "/stack:1024000000,1024000000") #include The topics of recent games are relatively simple, but their sentence system comparison pit search easy broken stack (after the game will not break the stack)And the minimum, that's a hell of a hole.It's more than four games, and every time I check in, I can't even sign it. Look at Daniel AAAA We Wawawa mood what is secondary every time the knife to the edge of the neckIf you think about it, you
Tags: zoj backtracking method c ++ZookeeperAlas! Go directly to the source code first! When can I add more instructions!# Include ZOJ Problem Set-1004-Anagrams by Stack
I started to exercise questions ~~ Ouye!
Poj 1003 hangover
So easy to say this question ~~
# Include
Poj 1004 Financial Management
Is to calculate the average, read the question OK ~~
# Include
Source: Author ignatius.l (Hdu 1061) Base time limit: 1 seconds space limit: 131072 KB Score: 5 Difficulty: 1 level algorithm The problem gives an integer N, the last digit of the decimal representation of the output n^n (n-th square). Input
A number n (1 Output
The lowest digit of the output n^nInput example
13Output example
3
The cyclic section of the Power Mantissa is 4! To learn a new posture ~Know this point directly just as good.The AC code is attached:1#include 2#include
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.