結果

問題 No.1468 Colourful Pastel
ユーザー hatsuka_iwa
提出日時 2021-04-19 21:55:44
言語 C++14
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 29 ms / 1,000 ms
+ 677µs
コード長 377 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 951 ms
コンパイル使用メモリ 188,260 KB
実行使用メモリ 5,888 KB
最終ジャッジ日時 2026-08-06 01:26:22
合計ジャッジ時間 3,077 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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