Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
62046 牛延希 小猫吃鱼 C++ Wrong Answer 1 MS 276 KB 373 2023-12-16 17:38:25

Tests(2/5):


Code:

# 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; }


Run Info:

------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