| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 62048 | 牛延希 | 小猫吃鱼 | C++ | Wrong Answer | 1 MS | 268 KB | 373 | 2023-12-16 17:38:50 |
# include<iostream> # include<algorithm> # include<string.h> using namespace std; struct nyx{ int x; int y; int z; }f[114514]; bool camp(nyx a,nyx b){ return a.z<b.z; } int main(){ int n,m,s=0; cin>>n; for(int i=0;i<n;i++){ cin>>f[i].x>>f[i].y; f[i].z=f[i].x+f[i].y; }sort(f,f+n,camp); cout<<f[0].z*n+n-1; return 0; }
------Input------
20 6 3 7 1 3 2 7 1 6 3 7 1 3 2 7 1 3 2 8 3 9 5 8 3 9 5 6 3 3 2 8 3 9 5 8 3 9 5 6 3
------Answer-----
120
------Your output-----
119