谁是最好的Coder
来源:互联网 发布:免费聊天交友软件 编辑:程序博客网 时间:2024/04/28 17:47
谁是最好的Coder
时间限制:1000 ms | 内存限制:65535 KB
难度:0
- 描述
- 计科班有很多Coder,帅帅想知道自己是不是综合实力最强的coder。帅帅喜欢帅,所以他选了帅气和编程水平作为评选标准。每个同学的综合得分是帅气程度得分与编程水平得分的和。他希望你能写一个程序帮他一下。
- 输入
- 数据有多组。
输入一个数n,代表计科班的总人数。
接下来有n行数,一行数有两个数a,b。
其中a代表该同学的编程水平,b代表该同学的帅气程度。
n=0表示输入结束。 - 输出
- 每组数据占一行,输出所有同学中综合得分最高的分数。
- 样例输入
59 107 111 65 73 527 37 60
- 样例输出
1913
- 上传者
- wsp0214代码:
#include <iostream>#include <stdio.h> #include <string.h>#include <math.h>#include <vector>#include <queue>#include <stack>#include <map>#include <string>#include <algorithm>using namespace std; /* run this program using the console pauser or add your own getch, system("pause") or input loop */int main(int argc, char** argv) {int n;cin>>n;while(n!=0){int max=-1;int a,b;while(n--){cin>>a>>b;if(a+b>max){max=a+b;}}cout<<max<<endl;cin>>n;}return 0;}
阅读全文
0 0
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的Coder
- 谁是最好的COder
- 水:谁是最好的Coder
- 596 谁是最好的Coder
- nyoj 谁是最好的Coder
- ACM-谁是最好的Coder
- css
- Linux 线程
- 【脚本语言系统】关于Python正则表达式sys.re, 你需要知道的事
- 给初学者的RxJava2.0教程(四)
- 041-Java-032
- 谁是最好的Coder
- MySQL整数类型、实数类型
- 匹配用户名的正则表达式
- 香蕉派 BPI-M2 Berry 四核开源单板计算机, 全志R40/allwinner V40芯片设计
- [Spark]Spark RDD 指南一 引入Spark
- GPUImage混合滤镜处理图片
- 紫金港基地天眼系统信号触发调试记录
- 使用lucene4.6进行排序时报错:java.lang.IllegalArgumentException: after must be a FieldDoc; got doc=411 score=1
- 基于Python的微信开发(2):定时天气预报