luminous electric

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

Hangzhou Electric---2053 Switch Game

Problem Description There is many lamps in a line. All of the themare off at first. A series of operations is carried out on these lamps. On thei-th operation, the lamps whose numbers is the multiple of I change thecondition (on to off and off).Input Each test case contains only a number n (0Output output The condition of the n-th lamp after infinity operations (0-off, 1-on).Sample Input 15Sample Output 10HintConsider the second test case:The initial condition:0 0 0 0 0 ...After the first Operat

Hangzhou Electric 1795 The least one

The least oneTime limit:9000/3000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 492 Accepted Submission (s): 184Problem Description in the RPG game ' go back Ice Age ' (I decide to develop the game after my undergraduate education), all Heros has their own respected value, and the skill of killing monsters is defined as the following rule:one hero can Ki LL the monstrers whose respected values is smaller then himself and the both respected values have none common

Hangzhou Electric 1795--the least one

integer Mi, 0Output for each case, there is Q results, in each result, you should output the value of the hero you'll dispatch to C Omplete the task.Sample Input237Sample Output511AuthorwangyeSource2008 "Insigma International Cup" Zhejiang Collegiate Programming Contest-warm up (4)Recommendwangye | We have carefully selected several similar problems for you:1793 1796 1797 1794 1798 test instructions: Kill Monster game, Hero's ability to be greater than the monster, and both ability is prime, co

Hangzhou Electric 1242--rescue (bfs+ priority queue)

for(intI=0;i4; i++) + { -next.x=current.x+dir[i][0]; $next.y=current.y+dir[i][1]; $ - if(next.x>=0next.x0next.y'#'!Vis[next.x][next.y]) - { the - if(map[next.x][next.y]=='R')Wuyi returncurrent.time+1; the - if(map[next.x][next.y]=='x') Wunext.time=current.time+2; - Else Aboutnext.time=current.time+1; $vis[next.x][next.y]=1; - Q.push (next); - } - }

Hangzhou Electric 1241--oil Deposits (DFS)

pockets is part of the same oil deposit if they is adjacent horizontally, vertically, or diagonally. An oil deposit won't contain more than pockets.Sample INPUT1 1 * 3 5 *@*@* **@** *@*@* 1 8 @@****@* 5 5 ****@ *@@*@ *@**@ @@@*@ @@**@ 0 0Sample Output0 1 22Sourcemid-central USA 1997Recommendeddy | We have carefully selected several similar problems for you:1016 1010 1312 1242 1240//Mark →→1#include 2#include 3 using namespacestd;4 #defineN 110;5 intm, N, I, J;6 7 intac[8][2]={{0,1},{1,1},{1,0},

Prime Ring problem (Hangzhou electric 1016) (DFS)

Prime Ring problemTime limit:4000/2000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 28204 Accepted Submission (s): 12561Problem 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 the adjacent circles should is a PR Ime.Note:the number of first circle should always be 1.INPUTN (0 Outputthe output format is shown as sample below. Each row represents a series of cir

Hangzhou Electric HDU ACM 1175 repeatedly see (Trouble of BFS)

relationship between inquiries, it is for the current state!OutputEach set of input data corresponds to one row of output. If you can eliminate the output "YES", you cannot output "no".Sample InputSample OutputYesnonononoyes This topic at that time to pit me an afternoon time .... The code is flawed, and there are always unexpected letters, and the most pit is that dir array elements are not the same as the wrong, ghosts know why. It's similar to the one I did before. Just BFS a search to the e

Hangzhou Electric HDU 1312 Red and Black (Super simple Dfs)

reach from the Initia L tile (including itself).Sample Input6 9....#......#..............................#@...#.#. #.11 9.#..........#.#######. #.#.....#.. #.#.###.#.. #.#[email protected]#.#. #.#####.#.. #.......#.. #########............ 11 6..#. #.. #....#.. #.. #....#.. #.. ###.. #.. #.. #@...#.. #.. #....#.. #.. #.. 7 7..#.#....#.#. ###.###[email protected]###.###. #.#....#.#.. 0 0Sample Output4559613 #include Copyright NOTICE: This article for Bo Master original article, without Bo Master

Hangzhou Electric---1108 least common multiple

Least common multipleTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 38681 Accepted Submission (s): 21606Problem DescriptionGiven two positive integers, calculate the least common multiple of these two numbers.InputThe input contains multiple sets of test data, with only one row per group, including two positive integers not greater than 1000.OutputFor each test case, the least common multiple of these two numbers is given, and each instance ou

Hangzhou Electric HDU ACM 1326 Box of Bricks

Box of BricksTime limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)Total submission (s): 5457 Accepted Submission (s): 2358Problem Descriptionlittle Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different height. "Look, I ' ve built a wall!", he tells his older sister Alice. "Nah, should make all stacks the same height. Then you would has a real wall. ", she retorts. After a little con-sideration, Bob sees that she was

Hangzhou Electric HDU 1202 The calculation of GPA

GPA.Input contains more than one set of data, and the first row of each group of data has a number n, and the next row of n rows represents a score. Each line has two actual number S,p,s represents the course's credit, p indicates the student's score (percentile). If p=-1 The student This course lacks the examination, should not be counted. Output outputs a row for each set of data, representing the student's GPA, which retains two decimal places. If GPA does not exist, output-1.Sample Input33

Hangzhou Electric oj1005 Problem Solving

1005ac+ Problem Solving Ideas Analysis: 1, in the title (1 2, (A * f (n-1) + B * F (n-2)) MoD 7 = (a%7*f (n-1) +b%7*f (n-2))%7 3, because F (i) and F (i+1) have only 49 combinations, because (f (i), (i+1) There are only 7 options, that is, only one of the 0,1,2,3,4,5,6. Therefore, the cycle Solving: 1, the cycle is first, by the way, the first period of F (n) to find out. 2, using the cycle, the remaining f (n) is directly obtained. Code: #include #define M 52 in

Hangzhou electric HDU 1205 eat sweets

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

Two point distance Hangzhou Electric 2001

问题描述 输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。输入 输入数据有多组,每组占一行,由4个实数组成,分别表示x1,y1,x2,y2,数据之间用空格隔开。输出 对于每组输入数据,输出一行,结果保留两位小数。样例输入 0 0 0 1 0 1 1 0 样例输出 1.00 1.41 输入两个坐标,计算两点间距离,无限循环;#include#includeint main(){ doublea,b,c,d,m; while(scanf("%lf%lf%lf%lf",a,b,c,d)!=EOF){m=(a-c)*(a-c)+(b-d)*(b-d);printf("%.2f\n",sqrt(m));}return0; } 1 Note: 1 while(scanf("%lf%lf%lf%lf",a,b,c,d)!=EOF):实现无限循环! Two point distance Hangzhou

Hangzhou Electric HDU 1279 Verifying the Angle Valley conjecture

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

Hangzhou Electric HDU 1196 Lowest Bit

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

Hangzhou Electric HDU 1164 Eddy ' s

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

Hangzhou Electric OJ 15th ACM first question Hearthstone

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

Hangzhou Electric HDU ACM 1563 Find your present!

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

Hangzhou Electric HDU 1570 A C

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

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.