1 条题解
-
1
#include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> #include<string> using namespace std; struct point{ int points; string name; }; struct point arr[105]; bool cmp(point a,point b){ if(a.points != b.points) return a.points > b.points; } int main(){ int n; cin >> n; for(int i=0;i<n;i++){ cin >> arr[i].points >> arr[i].name; } sort(arr,arr+n,cmp); cout << arr[0].name; return 0; }
- 1
信息
- ID
- 6936
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 1
- 标签
- (无)
- 递交数
- 14
- 已通过
- 12
- 上传者