結果
問題 |
No.938 賢人を探せ
|
ユーザー |
![]() |
提出日時 | 2019-12-21 13:08:13 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 554 bytes |
コンパイル時間 | 763 ms |
コンパイル使用メモリ | 81,592 KB |
最終ジャッジ日時 | 2025-01-08 13:47:33 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 7 WA * 14 |
ソースコード
// Example program #include <iostream> #include <string> #include <set> #include <algorithm> int main() { int n; std::cin >> n; std::set<std::string> all, cheaters, non_cheaters; for (int i=0;i<n;++i) { std::string a,b; std::cin >> a >> b; all.insert(b); cheaters.insert(a); } std::set_difference(all.begin(), all.end(), cheaters.begin(), cheaters.end(), std::inserter(non_cheaters, non_cheaters.end())); for (const auto& s : non_cheaters) std::cout << s << std::endl; return 0; }