1047. 编程团体赛(20)
来源:互联网 发布:sqlserver 图标 编辑:程序博客网 时间:2024/06/12 06:05
水题。
// 2017/10/14 NCU // PAT-B 1053// scienceZ#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>using namespace std;int arr[15000];int n, mymax, ans;int main(){ cin >> n; for (int i = 0; i<n; i++){ char dui[50]; int a; cin >> dui >> a; arr[atoi(dui)]+=a; if (arr[atoi(dui)]>mymax){ mymax = arr[atoi(dui)]; ans = atoi(dui); } } printf("%d %d\n", ans, mymax); return 0;}
阅读全文
0 0
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- 1047. 编程团体赛(20)
- Java网络编程知识-笔记四
- python-代码。遇到的错误集锦
- flume数据采集
- 栈和队列判断回文数
- 匿名函数、嵌套函数、闭包是怎么回事?
- 1047. 编程团体赛(20)
- Linux中进程通讯--信号量
- INSERT 语句与 FOREIGN KEY SAME TABLE 约束"FK__Course__Cpno__1367E606"冲突。该冲突发生于数据库"student",表"dbo.Course",
- 【LeetCode 4-5】4.Median of Two Sorted Arrays 5.Longest Palindromic Substring
- Java五种字符串连接的性能比较
- 单向循环链表C语言实现
- 贪心算法——完美的代价
- 第八周项目三(4)—顺序串算法之串中字符的替换
- 代码块、继承、final关键字