h d electric

Read about h d electric, The latest news, videos, and discussion topics about h d electric from alibabacloud.com

Hangzhou Electric Acm1124--factorial

, but, think about it, 25 is definitely a multiple of 5, so, the above has been counted once, so only need to add 80 is good.80/5 = 16 (equivalent to 2015/125), is the 1~2015 between 16 125 multiples, plus 16, for the same reason.16/5 = 3 (equivalent to 2015/625), is the 1~2015 between 3 625 multiples, plus 3, for the same reason.3/5 = 0 (equivalent to 2015/3125); not a multiple of 3125.So 2015! There are 403 + 80 + 16 + 3 consecutive 0 in the back.The following is the code for the AC:#include

Hangzhou Electric 1248 Ice throne "full backpack"

Problem-Solving ideas: Direct set formula can be done by a complete backpack.Problem description The undead Lich King, the Death Knight got an n-dollar bill (remember, only a note), in order to prevent his frequent death in the battle, he decided to buy himself some props, so he came to the Goblin store before.Death Knight: "I want to buy props!"Goblin businessman: "We have three kinds of props here, 150 pieces of blood bottle, a magic medicine 200 pieces of one, invincible potion 350 pieces of

Hangzhou Electric (HDU) ACM 4548 US prime

{ for(int J=2*I;J1000000;J+=I) {Prime[J]=false;Beauty[J]=false; }}//prime number filter core code area}void Beautyprime () { int Sum,K; for (int I=2;I1000000;I++) {Sum=0;K=I; if (Prime[I]==true ) { while( K!=0) {Sum+=K%Ten;K/=Ten; } if( Prime[Sum]!=true) {Beauty[I]=false; } }}} voidDp()///Dynamic planning idea, dp[i] that is, the number of primes 1 to I {Memset(Dp,0 ,sizeof( Dp)); for (int I=1;I1000000;I + +) { if( Beauty[I]==true) {Dp[I]=Dp[I-1]+1; }

Hangzhou Electric 1527--Take the stone game (Witzov game)

number 1 or 0, or 1 if you are the winner, or 0 for the other.Sample Input2 18 44 7Sample Output010SourcenoiRecommendll | We have carefully selected several similar problems for you:1404 1536 1517 1524 1729 Witzov game (Wythoff game): There are two piles of various items, two people take turns From a heap or at the same time from the two piles to take the same number of items, the provisions of at least one at a time, more than open, the last to win the light.In this case it is quite complicate

2015 Hangzhou Electric Multi-School (IV) Change list

Problem number Hdu Type Game Distribution Eventually 1001 5327 YES √ 1002 5328 YES √ 1003 5329 H 1004 5330 W 1005 5331 H 1006 5332 W 1007 5333 H 1008 5334

Hangzhou Electric Acm1222--wolf and rabbit~~ greatest common divisor

The meaning of the title is: the Rabbit casually hide in a hole, the wolf from the hole No. 0 began to find, every time to find the next is a number of M, all the holes formed ring.Input m and n, Hole is number No. 0 to n-1.The greatest common divisor of M and N is 1, and the wolf can be found in every hole. Otherwise, some holes are ignored, and those holes are safe.The following is the code for the AC:#include Copyright NOTICE: This article for Bo Master original article, without Bo Master per

Hangzhou Electric HDU ACM 1698 Just a Hook (segment tree interval update delay mark)

, the value is 2.For each golden stick, the value is 3.Pudge wants to know the total value of the hook after performing the operations.Consider the original hook is a made up of cupreous sticks.Inputthe input consists of several test cases. The first line of the input is the number of the cases. There is no more than cases.For each case, the first line contains a integer N, 1Next Q lines, each line contains three integers X, Y, 1Outputfor, print a number in a line representing the total value of

Hangzhou Electric 2017

Problem description for a given string, statistics the number of occurrences of a numeric character.Input data has multiple lines, the first line is an integer n, indicating the number of test instances, followed by n rows, each containing a string consisting of letters and numbers.Output for each test instance, outputs the number of values in the string, with each output occupying one row.Sample INPUT2ASDFASDF123123ASDFASDFASDF111111111ASDFASDFASDFSample Output69Code:1#include 2#include malloc.

Hangzhou Electric (HDU) 2085 nuclear reactor water problem

Nuclear reactorTime limit:1000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)Total submission (s): 12219 Accepted Submission (s): 5547Problem description There are two types of events occurring in a nuclear reactor:When the high-energy particle strikes the nucleus, the particle is absorbed, releasing 3 high-energy particles and a low-energy particle.When the low-energy particle strikes the nucleus, the particle is absorbed, releasing 2 high-energy particles and a low-energy par

Hangzhou Electric---2085 nuclear reactors

one row.Sample Input 5 2-1Sample Output 571, 20911, 4Tip You can use long long int against GNU C + + and use __int64 against VC6AuthorUnknownSource 2006/1/15ACM Program Design Final ExamRecommendLcyAnalysis: From the No. 0 second to 1 seconds, 1 high-energy particles emit 3 high-energy particles and a low-energy particle, from the 1th second to 2nd seconds 3 high-energy particles and a low-energy particle generation (3*3+2*1) a high-energy particle, while 3 high-energy particles produce 3 low-e

Hangzhou Electric 1596find The safest road (SPFA)

city of 8600 and the city to goOutput If 86 fails to reach his destination, outputs "What a pity!",The other outputs the safety factor of the safest road between these two cities and retains three decimal places.Sample Input31 0.5 0.50.5 1 0.40.5 0.4 131 22 31 3Sample Output0.5000.4000.500authorailyanlu the same two times, each time has a new feeling: with AC code: #include Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced. Hangzhou

A = = B? (Hangzhou electric 2054)

A = = B?Time limit:1000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)Total submission (s): 64239 Accepted Submission (s): 10060Problem descriptiongive You both numbers A and B, if A is equal to B, you should print "YES", or print "NO".Inputeach test Case contains-numbers A and B.Outputfor each case, if A was equal to B, you should print "YES", or print "NO".Sample Input1 22 23) 34 3Sample OutputNoyesyesno/* The first time to do is always to understand the topic too simple. Aft

Hangzhou Electric 1754--i Hate It (line segment tree)

= Find (root*2, left, right); $b = Find (root*2+1, left, right); - returnMax (A, b); - } the intMain () - {Wuyi while(~SCANF ("%d%d", n, m)) the { - for(inti =1; I ) Wuscanf"%d", num[i]); -Build (1,1, N); About Charstr[Ten];intA, B; $ for(inti =1; I ) - { -CIN >> Str >> a >>b; - if(str[0] =='Q') Aprintf"%d\n", Find (1, A, b)); + Else the { -Num[a] =b; $Update (1, A, b); the } the } the

Hangzhou electric acm2665--kth number~~ partition tree

subtree, which will be used in later lookups.The picture is stolen, there is no time to do it yourself.2, find: Find the number of k on the interval [a, b]. If the number of children entering the left child is greater than or equal to K, go to the left subtree to find, if less than, then go to the right subtree lookup, find the number of k-s large, s for the interval [a, b] into the number of left subtree. Update interval [A, b].The code can be used as a template.#include Copyright NOTICE: Thi

Hangzhou Electric Acm1211--rsa

This problem, similar to the decryption of ciphertext. The meaning of the topic is very clear.Give you the number of P Q e l,l for the second row.Calculate the N and FN first, and then calculate the D.n = p * q;fn = (p-1) * (q-1).Then according to the D * e% fn = 1, calculate d.The key is to seek C. The number num to you is equal to c ^ d% n. c The corresponding ASCLL code is the decrypted character.The following is the code for the AC:#include Hangzhou Elec

Hangzhou Electric Acm1130--how Many Tree? Number of ~~catalan

The recursive formula for the Catalan number is: f (n) = f (n-1) * (4*n-2)/(n + 1);Since n is the maximum of 100, it is necessary to use an array to hold each of the Catalan numbers. You need to use a large number of operations.The following is the code for the AC:# include Hangzhou Electric Acm1130--how Many Tree? Number of ~~catalan

Hangzhou Electric HDU ACM 2199 Can You solve this equation?

Can you solve this equation?Time limit:2000/1000 MS (java/others) Memory limit:32768/32768 K (java/others)Total submission (s): 11180 Accepted Submission (s): 5151Problem Descriptionnow,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 = = Y,can you find its solution between 0 and 100 ;Now try your lucky.Inputthe first line of the input contains an integer T (1Outputfor Each test case, you should just output one real number (accurate up to 4 decimal places), which is the solution of The Equati

Hangzhou Electric 1001 Sum problem

First look at the topicThis problem, according to the meaning of the title, I understand, should be input, each group input line, and then the corresponding output, more than one blank line between the output, but the problem is how to know that he has entered the completed, the following should show the output. Misunderstood by the problem input and output case. It was then replaced by a line of output, followed by the output of the line, and then the input, output, alternating.#include using n

Hangzhou Electric acm1878--Euler circuit

Simple Euler circuit, title.Euler's circuit judgment:1. In the direction graph: The first necessary condition is that the graph is connected, so the vertex's penetration is equal to the degree of the.2. In undirected graphs: the first condition or the graph is connected, followed by the vertex is even several (the degree of the vertex is even)This problem is a graph, so according to the judgment method to write, very simple, the decision does not prove.I use and check the set to determine whethe

Hangzhou Electric 1021--fibonacci Again

Fibonacci AgainTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 43441 Accepted Submission (s): 20755Problem Descriptionthere is another kind of Fibonacci numbers:f (0) = 7, f (1) = one, f (n) = f (n-1) + f (n-2) (n>=2).Inputinput consists of a sequence of lines, each containing an integer n. (n Outputprint the word "yes" if 3 divide evenly into F (n).Print the word "no" if not.Sample Input0 1 2 3 4 5Sample Outputauthorleojay//7 11 18 29 47 76 12

Total Pages: 15 1 .... 11 12 13 14 15 Go to: Go

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.