結果

問題 No.1468 Colourful Pastel
ユーザー kekenxkekenx
提出日時 2024-01-13 01:15:19
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 19 ms / 1,000 ms
コード長 461 bytes
コンパイル時間 961 ms
コンパイル使用メモリ 83,280 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-28 00:57:13
合計ジャッジ時間 1,955 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cassert>
#include <map>

using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  int N; cin >> N;
  map<string, int> A, B;
  for (int i = 0; i < N; i++) {
    string a; cin >> a;
    A[a]++;
  }
  for (int i = 0; i < N - 1; i++) {
    string b; cin >> b;
    B[b]++;
  }
  for (const auto &[val, cnt]: A) {
    if (B[val] != cnt) {
      cout << val << endl;
      break;
    }
  }
  return 0;
}


0