摘要: Problem DescriptionThe highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at wh... 阅读全文
posted @ 2014-10-27 16:25 zqxLonely 阅读(356) 评论(0) 推荐(0)
摘要: Problem DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In... 阅读全文
posted @ 2014-10-27 16:24 zqxLonely 阅读(271) 评论(0) 推荐(0)
摘要: Problem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method:1. Each sub-string containing k same charac... 阅读全文
posted @ 2014-10-27 16:22 zqxLonely 阅读(314) 评论(0) 推荐(0)
摘要: Problem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).InputInput consists of a sequence o... 阅读全文
posted @ 2014-10-27 16:20 zqxLonely 阅读(223) 评论(0) 推荐(0)
摘要: Problem Description给定两个正整数,计算这两个数的最小公倍数。Input输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数.Output对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。Sample Input10 14Sample Output70 1... 阅读全文
posted @ 2014-10-27 16:18 zqxLonely 阅读(284) 评论(0) 推荐(0)
摘要: Problem DescriptionEddy usually writes articles ,but he likes mixing the English letter uses, for example "computer science" is written frequently "co... 阅读全文
posted @ 2014-10-27 16:16 zqxLonely 阅读(265) 评论(0) 推荐(0)
摘要: Problem DescriptionGiven an positive integer A (1 2 #include 3 4 5 int main(){ 6 int A; 7 int timer; 8 9 while(1){10 t... 阅读全文
posted @ 2014-10-27 16:15 zqxLonely 阅读(264) 评论(0) 推荐(0)
摘要: Problem Description统计给定的n个数中,负数、零和正数的个数。Input输入数据有多组,每组占一行,每行的第一个数是整数n(n 2 3 int main(){ 4 int n; 5 int i; 6 int a; 7 int b; 8 i... 阅读全文
posted @ 2014-10-27 16:14 zqxLonely 阅读(328) 评论(0) 推荐(0)
摘要: Problem Description输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。Input输入数据有多组,每组占一行,有三个字符组成,之间无空格。Output对于每组输入数据,输出一行,字符中间用一个空格分开。Sample InputqweasdzxcSample Outp... 阅读全文
posted @ 2014-10-27 16:13 zqxLonely 阅读(350) 评论(0) 推荐(0)
摘要: Problem Description输入两点坐标(X1,Y1),(X2,Y2),计算并输出两点间的距离。Input输入数据有多组,每组占一行,由4个实数组成,分别表示x1,y1,x2,y2,数据之间用空格隔开。Output对于每组输入数据,输出一行,结果保留两位小数。Sample Input0 0... 阅读全文
posted @ 2014-10-27 16:11 zqxLonely 阅读(907) 评论(0) 推荐(0)