Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
869 A班-许锘林 挖掘机技术哪家强 C++ 通过 100 1 MS 268 KB 502 2024-11-30 10:56:59

Tests(4/4):


#include <bits/stdc++.h> using namespace std; struct chengji { int biaohao; int fen; }a[1000101]; int main() { int n; cin>>n; int temp[n + 1]; for(int i = 1;i <= n;i++) { cin>>a[i].biaohao>>a[i].fen; temp[i] = 0; } for(int i = 1;i <= n;i++) { temp[a[i].biaohao] += a[i].fen; } int max = 0; int f = 0; for(int i = 1;i <= n;i++) { if(max < temp[i]) { max = temp[i]; f = i; } } cout<<f<<" "<<max; return 0; }


测评信息:

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0