Translate

Views

Thursday, August 1, 2019

Solution Kattis · ICPC Awards

https://open.kattis.com/problems/icpcawards
#include<bits/stdc++.h>
using namespace std;

int n;
string uni, school;
map<string, bool> m;
vector< pair<string, string> > vp;

int main(){
 cin >> n;
 for(int i=1; i<=n; i++){
  cin >> uni >> school;
 
  if (!m[uni]){
   m[uni]=true;
   vp.push_back(make_pair(uni,school));  
  }
 }
 for(int i=0; i<12; i++) 
           cout<<vp[i].first<<" "<<vp[i].second<<"\n";
 
}
Good luck! If you need help please leave a comment :)