結果
問題 |
No.1468 Colourful Pastel
|
ユーザー |
![]() |
提出日時 | 2021-04-04 19:20:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 51 ms / 1,000 ms |
コード長 | 553 bytes |
コンパイル時間 | 1,882 ms |
コンパイル使用メモリ | 175,080 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-28 03:29:28 |
合計ジャッジ時間 | 3,137 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:22:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17' [-Wc++17-extensions] 22 | for(auto [key,val] : mp) { | ^
ソースコード
/** * @FileName a.cpp * @Author kanpurin * @Created 2021.04.04 19:18:41 **/ #include "bits/stdc++.h" using namespace std; typedef long long ll; int main() { int n;cin >> n; unordered_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 [key,val] : mp) { if (val != 0) { cout << key << endl; return 0; } } assert(true); return 0; }