結果

問題 No.1468 Colourful Pastel
ユーザー yansi819
提出日時 2024-03-22 11:02:57
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 49 ms / 1,000 ms
コード長 461 bytes
コンパイル時間 4,369 ms
コンパイル使用メモリ 256,940 KB
最終ジャッジ日時 2025-02-20 10:54:27
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
using ld = long double;

int main() {
  int N; cin >> N;
  map<string, int> mp;
  for (int i = 0; i < N; i++) {
    string s; cin >> s;
    mp[s]++;
  }
  for (int i = 0; i < N - 1; i++) {
    string s; cin >> s;
    mp[s]--;
  }
  for (auto p: mp) {
    if (p.second > 0) {
      cout << p.first << endl;
      return 0;
    }
  }
  return 0;
}
0