結果
| 問題 | No.938 賢人を探せ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-02-03 21:20:15 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 32 ms / 2,000 ms |
| + 42µs | |
| コード長 | 465 bytes |
| 記録 | |
| コンパイル時間 | 912 ms |
| コンパイル使用メモリ | 183,696 KB |
| 実行使用メモリ | 9,872 KB |
| 最終ジャッジ日時 | 2026-10-03 11:16:59 |
| 合計ジャッジ時間 | 3,069 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int n;
cin >> n;
string a[20010], b[20010];
set<string> s;
for(int i = 0;i < n;i++){
cin >> a[i] >> b[i];
s.insert(a[i]);
}
set<string> t;
for(int i = 0;i < n;i++){
if(s.find(b[i]) == s.end() && t.find(b[i]) == t.end()){
cout << b[i] << endl;
t.insert(b[i]);
}
}
return 0;
}