結果

問題 No.1468 Colourful Pastel
ユーザー hatsuka_iwa
提出日時 2021-04-19 21:55:44
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 52 ms / 1,000 ms
コード長 377 bytes
コンパイル時間 1,899 ms
コンパイル使用メモリ 176,952 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-04 05:07:21
合計ジャッジ時間 2,957 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin >> N;
  unordered_map<string, int> pastel;
  
  for (int i = 0; i < N * 2 - 1; i++) {
    string S = "";
    cin >> S;
    
    if (pastel.count(S))
      pastel[S]++;
    else
      pastel[S] = 1;
  }
  
  for (pair<string, int> p : pastel) {
    if (p.second % 2)
      cout << p.first << endl;
  }
}
0