上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 21 下一页
Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone was a trap, and he tried desperately to get out of this maze.The maze was a recta Read More
posted @ 2013-07-12 09:27 瓶哥 Views(315) Comments(0) Diggs(0) Edit
Problem DescriptionGiven a sequence 1,2,3,......N, your job is to calculate all the possible sub-sequences that the sum of the sub-sequence is M.InputInput contains multiple test cases. each case contains two integers N, M( 1 0 6 所以2*m>j*j----j 9 #include 10 int main()11 {12 int n,m,i,j;13 whi... Read More
posted @ 2013-07-11 22:32 瓶哥 Views(263) Comments(0) Diggs(0) Edit
Problem DescriptionThere must be many A + B problems in our HDOJ , now a new one is coming. Give you two hexadecimal integers , your task is to calculate the sum of them,and print it in hexadecimal too. Easy ? AC it !InputThe input contains several test cases, please process to the end of the file. Read More
posted @ 2013-07-11 22:29 瓶哥 Views(647) Comments(0) Diggs(0) Edit
Problem DescriptionGiven two rectangles and the coordinates of two points on the diagonals of each rectangle,you have to calculate the area of the intersected part of two rectangles. its sides are parallel to OX and OY .InputInput The first line of input is 8 positive numbers which indicate the coor Read More
posted @ 2013-07-11 22:27 瓶哥 Views(277) Comments(0) Diggs(0) Edit
Problem Descriptionwe define f(A) = 1, f(a) = -1, f(B) = 2, f(b) = -2, ... f(Z) = 26, f(z) = -26; Give you a letter x and a number y , you should output the result of y+f(x).InputOn the first line, contains a number T.then T lines follow, each line is a case.each case contains a letter and a number. Read More
posted @ 2013-07-11 22:26 瓶哥 Views(322) Comments(0) Diggs(0) Edit
Problem DescriptionGive you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".Inputeach test case contains two numbers A and B.Outputfor each case, if A is equal to B, you should print "YES", or print "NO".Sample Input1 2 2 2 3 3 4 Read More
posted @ 2013-07-11 22:25 瓶哥 Views(279) Comments(0) Diggs(0) Edit
Problem DescriptionThere are many lamps in a line. All of them are off at first. A series of operations are carried out on these lamps. On the i-th operation, the lamps whose numbers are the multiple of i change the condition ( on to off and off to on ).InputEach test case contains only a number n ( Read More
posted @ 2013-07-11 22:20 瓶哥 Views(390) Comments(0) Diggs(0) Edit
Problem DescriptionGive you the width and height of the rectangle,darw it.InputInput contains a number of test cases.For each case ,there are two numbers n and m (0 2 int main() 3 { 4 int n,m; 5 while(~scanf("%d%d",&n,&m)) 6 { 7 printf("+"); 8 for(int i=0;i<n... Read More
posted @ 2013-07-11 22:19 瓶哥 Views(524) Comments(0) Diggs(0) Edit
Problem DescriptionGive you a number on base ten,you should output it on base two.(0 2 int main() 3 { 4 int n, i, ans[11]; 5 while(~scanf("%d",&n)) 6 { 7 if(n==0) 8 { 9 printf("0\n"); 10 }11 for(i=0;n;i++... Read More
posted @ 2013-07-11 22:17 瓶哥 Views(313) Comments(0) Diggs(0) Edit
stringstream包括istringstream和ostringstream,提供读写string的功能,使用时需包含stream文件。4个操作:1. stringstream strm; 创建stringstream对象2. stringstream strm(s) ; s是string,复制构造函数3. strm.str() ; 返回strm中存储的string类型对象4. strm.str(s); 将string s复制给strm, 返回void功能:1.细化处理功能。如处理文件每行的同时处理每个单词,可用stringstream实现。string line, word;whil. Read More
posted @ 2013-07-11 17:04 瓶哥 Views(1489) Comments(0) Diggs(0) Edit
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 21 下一页