摘要: 分段函数Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KBTotal submit users: 328, Accepted users: 261Problem 10453 : No special judgementProblem description有一函数 x (x=10) 编写程序根据x的值输出y的值。Input输入将包含若干组数据,第一行为一个整数n,代表下面共有n组数据。接下来的每一行为一个x(共n行),代表一组数据。Output对于每组输入的数据x,输出其y值,每组数据输出一行。计算结果如果为小 阅读全文
posted @ 2013-11-23 17:06 褪色的狼 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 1. C++中格式控制在C++中,说到保留小数点后几位有效数字,就会想起setprecision,马上去cplusplus上查了下有关setprecision的资料,看了后明白了,懒得逐字翻译,直接贴在下面了:Set decimal precisionSets the decimal precision to be used by output operations.Behaves as if a call to the stream's member ios_base::precision with n as argument was made.The decimal precisi 阅读全文
posted @ 2013-11-23 16:18 褪色的狼 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 求三个整数中最大的数Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KBTotal submit users: 454, Accepted users: 385Problem 10452 : No special judgementProblem description有三个整数a,b,c,请输出三个整数中最大的数。Input输入每行包含三个整数a,b,c,整数范围在-231 ~ +231-1 之内。Output对于每行三个整数输出其中最大的整数,每组数据输出一行。Sample Input2 5 98 24 1S 阅读全文
posted @ 2013-11-23 16:04 褪色的狼 阅读(155) 评论(0) 推荐(0) 编辑
摘要: BalloonComes!Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:65536KBTotal submit users: 196, Accepted users: 168Problem 10370 : No special judgementProblem descriptionThe contest starts now! How excited it is to see balloons floating around. You, one of the best programmers in HDU, can g 阅读全文
posted @ 2013-11-17 14:44 褪色的狼 阅读(137) 评论(0) 推荐(0) 编辑
摘要: A+BforInput-OutputPractice(VIII)Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KBTotal submit users: 221, Accepted users: 213Problem 10369 : No special judgementProblem descriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line, 阅读全文
posted @ 2013-11-17 14:14 褪色的狼 阅读(203) 评论(0) 推荐(0) 编辑
摘要: A+BforInput-OutputPractice(VII)Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KBTotal submit users: 235, Accepted users: 225Problem 10368 : No special judgementProblem descriptionYour task is to Calculate a + b.InputThe input will consist of a series of pairs of integers a and b, s 阅读全文
posted @ 2013-11-17 14:10 褪色的狼 阅读(163) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;int main(){ int a,b,s,n; for(;;) { scanf("%d",&n); if(0==n) break; scanf("%d",&a); s=a; for(;(n-1)>0;n--) { scanf("%d",&b); s+=b; } printf("%d\n",s); } return 0;}A+BforInput-Outp... 阅读全文
posted @ 2013-11-17 14:03 褪色的狼 阅读(219) 评论(0) 推荐(0) 编辑
摘要: A+BforInput-OutputPractice(III)Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KBTotal submit users: 494, Accepted users: 457Problem 10363 : No special judgementProblem descriptionYour task is to Calculate a + b.InputInput contains multiple test cases. Each test case contains a pair 阅读全文
posted @ 2013-11-17 14:02 褪色的狼 阅读(172) 评论(0) 推荐(0) 编辑
摘要: TheHardestProblemEverTime Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KBTotal submit users: 165, Accepted users: 132Problem 10367 : No special judgementProblem descriptionJulius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself 阅读全文
posted @ 2013-11-17 14:00 褪色的狼 阅读(192) 评论(0) 推荐(0) 编辑
摘要: A+BforInput-OutputPractice(VI)Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KBTotal submit users: 268, Accepted users: 252Problem 10366 : No special judgementProblem descriptionYour task is to calculate the sum of some integers.InputInput contains multiple test cases, and one case 阅读全文
posted @ 2013-11-17 10:55 褪色的狼 阅读(245) 评论(0) 推荐(0) 编辑