Life is short, so we need program

每日一题, 积累从点滴开始

  :: 首页 :: 博问 :: 闪存 :: :: 联系 :: :: 管理 ::

2012年8月10日

摘要: 常用输入输出1.C语言scanf, printf; getc, putc; getchar, putchar; gets, puts;fgets, fputs;fgetc, fputc; fscanf, fprintf具体用法查c库函数。2.C++cin,coutcin后面还可以跟格式,比如:cin>>hex>>变量3.JAVAScanner sc = new Scanner(System.in);int i = sc.nextInt(); Scanner Std = new Scanner(); //Standard input streamprivate stati 阅读全文
posted @ 2012-08-10 14:03 CDU_ICPC 阅读(217) 评论(0) 推荐(0) 编辑

2012年6月16日

摘要: 祭祀广场时间限制:5000 ms | 内存限制:16384 KB描述 古老的滕格森部落,生活在一片稀疏的树林之中,他们信仰伟大的长天昊大神。 一天晚上,部落的首领猛格做了一个梦里,在梦里得到了长天昊神的神谕,要求他的部落建立一个大型的广场,用来举行对长天昊大神的祭拜仪式。其实,对于那时候的人来说,祭拜仪式之后常常会举行集体歌舞、狂欢活动,属于那个时代的群众娱乐项目。 腾格森部落生活的地方是一片乐土,环境优美,植物茂盛,动物成群,猛兽也不多。虽然那时的人寿命并不长,但由于他们不实行计划生育,所以人口众多。为了表示对长天昊大神的敬畏,同时也为了活动场地能容纳尽可能多的人,部落首领猛格想把广场建得越 阅读全文
posted @ 2012-06-16 12:18 CDU_ICPC 阅读(165) 评论(0) 推荐(0) 编辑

2012年6月14日

摘要: 超级最小公倍数时间限制:8000 ms | 内存限制:16384 KBhttp://www.bianchengla.com/oj/1/practise/problem?id=1001 描述给2个正整数a,b(1<=a,b<=10100),求a和b的最小公倍数。输入输入包含多组数据,每组数据一行,包含两个正整数a和b,中间以一个空格隔开。输入以0 0结束。输出每组数据输出一行,为a,b的最小公倍数。样例输入123 321123456789 9876543210 0样例输出1316113548070123626141 1 import java.math.*; 2 import jav 阅读全文
posted @ 2012-06-14 23:33 CDU_ICPC 阅读(307) 评论(0) 推荐(0) 编辑

2012年6月13日

摘要: A+B Problem时间限制:1000 ms | 内存限制:65535 KBhttp://www.bianchengla.com/oj/1/practise/problem?id=1000 描述 计算 a+b.输入本题有多组测试数据。第一行为测试数据的个数。每组数据有两个整数。范围在 -231 ~ +231-1 之内。输出对每组数据,输出对应的a+b的和。范围在 -231 ~ +231-1 之内。样例输入21 23 1样例输出34最短代码, gcc自动纠错环境编译通过, 变量在main()中括号声明默认为int.不需要加#include<stdio.h>, main不需要加int 阅读全文
posted @ 2012-06-13 21:12 CDU_ICPC 阅读(281) 评论(0) 推荐(0) 编辑

2012年6月12日

摘要: Let the Balloon RiseTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 1Accepted Submission(s) : 0Problem DescriptionContest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guess 阅读全文
posted @ 2012-06-12 21:14 CDU_ICPC 阅读(476) 评论(0) 推荐(0) 编辑

摘要: EncodingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15735Accepted Submission(s): 6708Problem DescriptionGiven a string containing only 'A' - 'Z', we could encode it using the following method: 1. Each sub-string containing k sam 阅读全文
posted @ 2012-06-12 20:02 CDU_ICPC 阅读(222) 评论(0) 推荐(0) 编辑

摘要: FatMouse' TradeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 23490Accepted Submission(s): 7380Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBea 阅读全文
posted @ 2012-06-12 20:01 CDU_ICPC 阅读(292) 评论(0) 推荐(0) 编辑

摘要: A + B Problem IITime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 115102Accepted Submission(s): 21803Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of 阅读全文
posted @ 2012-06-12 19:57 CDU_ICPC 阅读(176) 评论(0) 推荐(0) 编辑

摘要: A + B ProblemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 225588Accepted Submission(s): 66387Problem DescriptionCalculate A + B.InputEach line will contain two integers A and B. Process to end of file.OutputFor each case, output A + B in one lin 阅读全文
posted @ 2012-06-12 19:56 CDU_ICPC 阅读(139) 评论(0) 推荐(0) 编辑