답안 #568666

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
568666 2022-05-26T03:14:57 Z Garguy22 마라톤 경주 (COCI14_utrka) C++17
0 / 80
77 ms 22220 KB
#include <iostream>
#include <string>
#include <map>
using namespace std;

string str[100007];

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	int n;
	cin >> n;
	map<string, int> mp;
	for(int i = 0; i < 2*n-1; i++){
		cin >> str[i];
		mp[str[i]]++;
	}
	for(int i = 0; i < 2*n; i++){
		if(mp[str[i]] % 2){
			cout << str[i] << endl;
			return 0;
		}
	}

	return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 3456 KB Output is correct
2 Correct 2 ms 3412 KB Output is correct
3 Correct 3 ms 3464 KB Output is correct
4 Correct 3 ms 3540 KB Output is correct
5 Correct 4 ms 3504 KB Output is correct
6 Correct 77 ms 9656 KB Output is correct
7 Runtime error 72 ms 22220 KB Execution killed with signal 11
8 Halted 0 ms 0 KB -