답안 #914933

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
914933 2024-01-23T01:01:10 Z jpfr12 마라톤 경주 (COCI14_utrka) C++14
80 / 80
128 ms 18256 KB
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <deque>
#include <set>
#include <string>
#include <map>
#include <math.h>
#include <cmath>
#include <climits>
#include <unordered_map>
#include <unordered_set>
#include <assert.h>
#include <fstream>
#include <bitset>
#include <iomanip>
 
typedef long long ll;
using namespace std;
int MOD = (int)1e9;
int MAXN = 1e6;
 
//classes

 
 
//global


int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  //ifstream fin("input.txt");
  //ofstream fout("output.txt");
  //stop
  int n;
  cin >> n;
  map<string,int> Map;
  string s;
  for(int i = 0; i < n; i++){
    cin >> s;
    Map[s]++;
  }
  map<string,int> finish;
  for(int i = 0; i < n-1; i++){
    cin >> s;
    finish[s]++;
  }
  for(auto& i: Map){
    if(i.second != finish[i.first]) cout << i.first << '\n';
  }
  return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 1 ms 604 KB Output is correct
5 Correct 2 ms 604 KB Output is correct
6 Correct 53 ms 9296 KB Output is correct
7 Correct 87 ms 13652 KB Output is correct
8 Correct 120 ms 16712 KB Output is correct
9 Correct 128 ms 18256 KB Output is correct
10 Correct 126 ms 18256 KB Output is correct