Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- //ios_base::sync_with_stdio(false);
- //cin.tie(0);
- int n;
- scanf("%d", &n);
- double cur = 11;
- char ans[1000];
- while(n--) {
- char a[1000];
- double prob;
- scanf("%s", a);
- scanf("%lf", &prob);
- if(prob < cur) {
- memcpy(ans, a, sizeof(a));
- cur = prob;
- }
- }
- printf("%s", ans);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement