Skip to content

Instantly share code, notes, and snippets.

@enzerr
Created June 14, 2023 13:12
Show Gist options
  • Save enzerr/e126215317451804e7cdf4eabbe724f1 to your computer and use it in GitHub Desktop.
Save enzerr/e126215317451804e7cdf4eabbe724f1 to your computer and use it in GitHub Desktop.
#include<bits/stdc++.h>
using namespace std;
int main(){
int n; cin >> n;
string nome_res;
int maior=-1;
for(int i = 0; i < n; i++){
string nome; cin >> nome;
int lance; cin >> lance;
if(lance > maior){
maior = lance;
nome_res = nome;
}
}
cout << nome_res << '\n' << maior << '\n';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment