답안 #76781

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
76781 2018-09-17T18:18:17 Z dereotu 마라톤 경주 (COCI14_utrka) C++17
80 / 80
314 ms 18000 KB
#include <bits/stdc++.h>
#define endl '\n'
#define space ' '
#define st first
#define nd second
#define pb push_back
#define mp make_pair
#define ii pair <int,int>
#define iii pair < int,pair <int,int> >
#define vi vector <int>
#define vii vector < pair<int,int> >
#define forr(i,A,B) for(int i=A;i<B;++i)
#define input(file) freopen(file,"r",stdin)
#define output(file) freopen(file,"w",stdout)
using namespace std;

int n;
map<string,int> h;

int main(){
	cin>>n;
	forr(i,0,n){
		string s;
		cin>>s;
		h[s]++;
	}
	forr(i,0,n-1){
		string s;
		cin>>s;
		h[s]--;
	}
	for(auto it=h.begin();it!=h.end();it++){
		if((it->nd)>0){
			cout<<(it->st)<<endl;
			break;
		}
	}

	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 504 KB Output is correct
2 Correct 2 ms 616 KB Output is correct
3 Correct 3 ms 692 KB Output is correct
4 Correct 4 ms 788 KB Output is correct
5 Correct 4 ms 872 KB Output is correct
6 Correct 130 ms 5996 KB Output is correct
7 Correct 211 ms 9364 KB Output is correct
8 Correct 279 ms 12708 KB Output is correct
9 Correct 300 ms 15784 KB Output is correct
10 Correct 314 ms 18000 KB Output is correct