結果
問題 | No.938 賢人を探せ |
ユーザー | Leonardone |
提出日時 | 2019-12-01 03:47:39 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 55 ms / 2,000 ms |
コード長 | 459 bytes |
コンパイル時間 | 835 ms |
コンパイル使用メモリ | 79,964 KB |
実行使用メモリ | 7,116 KB |
最終ジャッジ日時 | 2024-12-14 11:42:42 |
合計ジャッジ時間 | 2,031 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 21 |
ソースコード
// Try yukicoder // author: Leonardone @ NEETSDKASU #include <iostream> #include <set> #include <vector> using namespace std; int main() { int n; cin >> n; set<string> s; vector<string> t; while (n--) { string a, b; cin >> a >> b; s.insert(a); t.push_back(b); } for (auto b : t) { if (s.find(b) == s.end()) { cout << b << endl; s.insert(b); } } return 0; }