結果
| 問題 |
No.938 賢人を探せ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-10 04:00:11 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 48 ms / 2,000 ms |
| コード長 | 403 bytes |
| コンパイル時間 | 1,869 ms |
| コンパイル使用メモリ | 70,388 KB |
| 実行使用メモリ | 6,892 KB |
| 最終ジャッジ日時 | 2024-12-14 11:50:54 |
| 合計ジャッジ時間 | 2,312 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
#include <iostream>
#include <set>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
string s;
set<string> bad;
vector<string> good;
cin >> n;
while (n--) {
cin >> s;
bad.insert(s);
cin >> s;
good.push_back(s);
}
for (string i : good) if (bad.find(i) == bad.end()) {
cout << i << endl;
bad.insert(i);
}
}