답안 #578256

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
578256 2022-06-16T09:28:01 Z Trisanu_Das 마라톤 경주 (COCI14_utrka) C++17
80 / 80
132 ms 10384 KB
#include <bits/stdc++.h>
 
using namespace std;
 
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  map<string, int> cnt;
  for (int i = 0; i < n; i++) {
    string s;
    cin >> s;
    cnt[s]++;
  }
  for (int i = 0; i < n - 1; i++) {
    string s;
    cin >> s;
    cnt[s]--;
  }
  for (auto &p : cnt) {
    if (p.second & 1) {
      cout << p.first << '\n';
    }
  }
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 324 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 404 KB Output is correct
6 Correct 54 ms 5316 KB Output is correct
7 Correct 83 ms 7764 KB Output is correct
8 Correct 111 ms 9404 KB Output is correct
9 Correct 120 ms 10384 KB Output is correct
10 Correct 132 ms 10272 KB Output is correct