結果
| 問題 | No.938 賢人を探せ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-03 12:03:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 56 ms / 2,000 ms |
| コード長 | 343 bytes |
| 記録 | |
| コンパイル時間 | 1,759 ms |
| コンパイル使用メモリ | 177,760 KB |
| 実行使用メモリ | 7,680 KB |
| 最終ジャッジ日時 | 2024-12-14 11:47:07 |
| 合計ジャッジ時間 | 3,033 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 21 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;cin >> n;
map<string,bool> mp;
vector<string> a(n),b(n);
for(int i=0;i<n;i++){
cin >> a[i] >> b[i];
mp[a[i]]=true;
}
for(int i=0;i<n;i++){
if(!mp[b[i]]){
cout << b[i] << endl;
mp[b[i]]=true;
}
}
}