結果
| 問題 |
No.1468 Colourful Pastel
|
| ユーザー |
|
| 提出日時 | 2021-05-01 01:41:10 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 20 ms / 1,000 ms |
| コード長 | 501 bytes |
| コンパイル時間 | 912 ms |
| コンパイル使用メモリ | 78,892 KB |
| 最終ジャッジ日時 | 2025-01-21 04:57:51 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
#include <iostream>
#include <string>
#include <map>
using namespace std;
void solve() {
int n;
cin >> n;
map<string, int> cnt;
for (int i = n; i--;) {
string s;
cin >> s;
++cnt[s];
}
for (int i = n - 1; i--;) {
string s;
cin >> s;
--cnt[s];
}
for (auto [s, c] : cnt) {
if (c != 0) cout << s << "\n";
}
}
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
solve();
return 0;
}