Alibabacloud.com offers a wide variety of articles about general electric application, easily find your general electric application information here online.
Eat candyTime limit:6000/3000 MS (java/others) Memory limit:65535/32768 K (java/others)Total submission (s): 27178 Accepted Submission (s): 7691Problem Descriptionhoho, finally from Speakless hand to win all the candy, is Gardon eat candy when there is a special hobby, is not like the same candy put together to eat, like to eat first, the next time to eat another, so But Gardon don't know if there is a candy-eating order so he can finish all the candies? Please write a program to help calculate
Verifying the Angle Valley conjectureTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 6653 Accepted Submission (s): 3417There are many speculations in problem description number theory that have not yet been resolved, one of which is known as the "Angular Valley conjecture", a problem that was popular in several prestigious universities in cert, the problem is described as: any one greater than the natural number, if it is odd, is multiplied by
Lowest BitTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 9052 Accepted Submission (s): 6656Problem Descriptiongiven an positive integer a (1 For example, given a = +, we can write a in binary form as 11010, so the lowest bit of a is ten, so the output should be 2 .Another example goes like this:given a = to, we can write A in binary form as 1011000, so the lowest bit of The output should is 8. Inputeach line of input contains only an integer
Eddy ' s-ITime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 7117 Accepted Submission (s): 4268Problem Descriptioneddy ' s interest is very extensive, recently he's interested in prime number. Eddy Discover the all number owned can is divided into the multiply of prime number, but he can ' t write program, so EDD Y have to ask intelligent him, he asks you to write a program which can do the number to divided into the multi Ply of prime number fac
problem DescriptionCDFPYSW loves playing a card game called "Hearthstone". Now he had N cards, he wants to split these cards into 4 piles.Let's assume the number of cards in each pile is A1, A2, A3, A4. It must be satisfied that:a1 * K1 = a2 + a3 + a4 A2 * k2 = a1 + A3 + a4 a3 * K3 = A1 + a2 + A4 A1, a2, A3, A4 Must be positive Because cdfpysw are clever, there must be a-to split there card. Can you tell CDFPYSW?InputThe first line was an integer T, means the number of cases.Then T-lines, each
Find your present!Time limit:1000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)Total submission (s): 3096 Accepted Submission (s): 2051Problem DescriptionIn The New Year party, everybody'll get a "special present". Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of the them would be yo Urs. Each present have a card number on it, and your present ' s card number would be the one that different from all the others. For examp
A CTime limit:2000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)Total submission (s): 4206 Accepted Submission (s): 2671Problem Descriptionare You excited the title "AC"? If The answer is YES, AC it;You must learn these and combination formulas in the school. If you had forgotten it, see the picture.Now I'll give you N and M, and your task was to calculate the answer.Inputin the first line, there is a integer T indicates the number of the test cases.Then T-cases follows in the
To find the product of odd numbersTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 56573 Accepted Submission (s): 36490Problem Descriptiongive you n integers and ask for the product of all the odd numbers in them.InputThe input data contains multiple test instances, one row per test instance, and the first number of each row is n, indicating that there is a total of n for this group of data, followed by n integers, you can assume that each set o
The Euler functionTime limit:2000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)Total submission (s): 4559 Accepted Submission (s): 1902Problem DescriptionThe Euler function phi is a important kind of function in number theory, (n) represents the amount of The numbers which is smaller than N and coprime to n, and this function have a lot of beautiful characteristics. Here comes a very easy question:suppose is given a, B, try to calculate (a) + (a+1) +....+ (b)Inputthere is severa
which the output a is located , the number of balls in the city wherea is located,the number of times a is transferredAnalysis:Can think of is to use and check set, the first two problems are very good solution, one to find the root node another find the total number of elements in this tree, difficult is the third problem, how to ask for the number of transfers?We can set an array to record, each time to update, obviously if in the merge function to calculate the formula is very troublesome, w
-1AuthorlinleSource2008 Zhejiang University Postgraduate second-round warm-up (2)--Full true simulationObservation point: Shortest Path (DIJKSTRA,FLOYD,SPFA)Main topic: Now there are n towns M Road, give the starting point and end point, ask whether can reach, if can, find the shortest road lengthIn fact, this is a typical shortest path problem, I now Master is three methods, DIJKSTRA,SPFA and Floyd, of which Floyd is the most easy to write, but the complexity of the time is the highest, triple
Problem number
Fd
Type
Game
Distribution
Eventually
1001
5343
SAM
W
1002
5344
YES
√
1003
5345
Game
W
1004
5346
Probability
H
1005
5347
YES
√
1006
5348
YES
√
1007
5349
YES
√
1
the remaining amount on the card is greater than or equal to 5 yuan before the purchase of an item, the purchase must be successful (even if the balance is negative on the card after purchase), it cannot be purchased (even if the amount is sufficient). So we all want to try to keep the balance on the card to the minimum. One day, the canteen has n vegetables for sale, each vegetable can be purchased once.If you know the price of each vegetable and the balance on the card, ask at least how much
Number SequenceTime limit:10000/5000 MS (java/others) Memory limit:32768/32768 K (java/others)Total submission (s): 11925 Accepted Submission (s): 5440Problem Descriptiongiven-sequences of numbers:a[1], a[2], ..., a[n], and b[1], b[2], ..., b[m] (1 Inputthe first line of input is a number T which indicate the number of cases. Each case contains three lines. The first line is the numbers n and M (1 Outputfor Each test case, you should the output one line which only contain K described above. If
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.