程序设计竞赛课件.pptx

上传人(卖家):晟晟文业 文档编号:4315361 上传时间:2022-11-29 格式:PPTX 页数:46 大小:1.51MB
下载 相关 举报
程序设计竞赛课件.pptx_第1页
第1页 / 共46页
程序设计竞赛课件.pptx_第2页
第2页 / 共46页
程序设计竞赛课件.pptx_第3页
第3页 / 共46页
程序设计竞赛课件.pptx_第4页
第4页 / 共46页
程序设计竞赛课件.pptx_第5页
第5页 / 共46页
点击查看更多>>
资源描述

1、ACM:Association for Computing Machinery 美国计算机协会美国计算机协会 ICPC:International Collegiate Programming Contest 国际大学生程序设计竞赛国际大学生程序设计竞赛 ACM/ICPC 由美国计算机协会主办的国际大学生程序设计竞赛由美国计算机协会主办的国际大学生程序设计竞赛ACM/ICPC 是世界上公认的历史悠久、规模最大、水平是世界上公认的历史悠久、规模最大、水平最高的国际大学生程序设计竞赛。最高的国际大学生程序设计竞赛。56如何比赛如何比赛?3人组队人组队79如何排名?如何排名?101112 C:sca

2、nf 速度快速度快 printf 格式容易控制格式容易控制 C+:cin使用简单使用简单,自动识别类型自动识别类型 cout 格式控制较麻烦格式控制较麻烦数据规模较大时数据规模较大时,推荐推荐(必须必须)使用使用scanf 以避免超时以避免超时(TLE)C和和C+的输入输出混合使用的输入输出混合使用2930Problem DescriptionYour task is to Calculate a+b.Too easy?!Of course!I specially designed the problem for ACM beginners.You must have found that s

3、ome problems have the same titles with this one,yes,all these problems were designed for the same aim.InputThe input will consist of a series of pairs of integers a and b,separated by a space,one pair of integers per line.OutputFor each pair of input integers a and b you should output the sum of a a

4、nd b in one line,and with one line of output for each line in input.Sample Input1 510 20Sample Output63031323334Problem DescriptionYour task is to Calculate a+b.InputInput contains an integer N in the first line,and then N lines follow.Each line consists of a pair of integers a and b,separated by a

5、space,one pair of integers per line.OutputFor each pair of input integers a and b you should output the sum of a and b in one line,and with one line of output for each line in input.Sample Input21 510 20Sample Output63035 for(i=0;in;i+)36Problem DescriptionYour task is to Calculate a+b.InputInput co

6、ntains multiple test cases.Each test case contains a pair of integers a and b,one pair of integers per line.A test case containing 0 0 terminates the input and this test case is not to be processed.OutputFor each pair of input integers a and b you should output the sum of a and b in one line,and wit

7、h one line of output for each line in input.Sample Input1 510 200 0Sample Output630Problem DescriptionYour task is to Calculate the sum of some integers.InputInput contains multiple test cases.Each test case contains a integer N,and then N integers follow in the same line.A test case starting with 0

8、 terminates the input and this test case is not to be processed.OutputFor each group of input integers you should output their sum in one line,and with one line of output for each line in input.Sample Input4 1 2 3 45 1 2 3 4 50 Sample Output1015Problem DescriptionYour task is to calculate the sum of

9、 some integers.InputInput contains an integer N in the first line,and then N lines follow.Each line starts with a integer M,and then M integers follow in the same line.OutputFor each group of input integers you should output their sum in one line,and with one line of output for each line in input.Sa

10、mple Input24 1 2 3 45 1 2 3 4 5Sample Output1015Problem DescriptionYour task is to calculate the sum of some integers.InputInput contains multiple test cases,and one case one line.Each case starts with an integer N,and then N integers follow in the same line.OutputFor each test case you should outpu

11、t the sum of N integers in one line,and with one line of output for each line in input.Sample Input4 1 2 3 45 1 2 3 4 5Sample Output1015Problem DescriptionYour task is to Calculate a+b.InputThe input will consist of a series of pairs of integers a and b,separated by a space,one pair of integers per

12、line.OutputFor each pair of input integers a and b you should output the sum of a and b,and followed by a blank line.Sample Input1 510 20Sample Output630Problem DescriptionYour task is to calculate the sum of some integers.InputInput contains an integer N in the first line,and then N lines follow.Ea

13、ch line starts with a integer M,and then M integers follow in the same line.OutputFor each group of input integers you should output their sum in one line,and you must note that there is a blank line between outputs.Sample Input34 1 2 3 45 1 2 3 4 53 1 2 3Sample Output1015643 最好不要进行函数声明最好不要进行函数声明 变量

14、定义在使用之前变量定义在使用之前 避免避免for(int i=0;i n;i+)i的使用范围仅仅在的使用范围仅仅在for内部,容易导致内部,容易导致CE 遇到问题首先自己查找资料,之后再提问遇到问题首先自己查找资料,之后再提问44Problem DescriptionGive you an operator(+,-,*,/-denoting addition,subtraction,multiplication,division respectively)and two positive integers,your task is to output the result.Is it very

15、 easy?Come on,guy!PLMM will send you a beautiful Balloon right now!Good Luck!InputInput contains multiple test cases.The first line of the input is a single integer T(0T1000)which is the number of test cases.T test cases follow.Each test case contains a char C(+,-,*,/)and two integers A and B(0A,B10000).Of course,we all know that A and B are operands and C is an operator.OutputFor each case,print the operation result.The result should be rounded to 2 decimal places If and only if it is not an integer.Sample Input4+1 2-1 2*1 2/1 2Sample Output3-120.5045有什么问题?有什么问题?

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 办公、行业 > 各类PPT课件(模板)
版权提示 | 免责声明

1,本文(程序设计竞赛课件.pptx)为本站会员(晟晟文业)主动上传,163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
2,用户下载本文档,所消耗的文币(积分)将全额增加到上传者的账号。
3, 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(发送邮件至3464097650@qq.com或直接QQ联系客服),我们立即给予删除!


侵权处理QQ:3464097650--上传资料QQ:3464097650

【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。


163文库-Www.163Wenku.Com |网站地图|