1 solutions
-
0
C++ :
#include<bits/stdc++.h> using namespace std; struct node{ int score; string name; }; node a[105]; bool cmp(node x,node y){ return x.score > y.score; } int main(){ int n; cin >> n; for(int i = 1;i <= n;i ++)cin >> a[i].score >> a[i].name; sort(a + 1,a + n + 1,cmp); cout << a[1].name; return 0; }
- 1
Information
- ID
- 18921
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By