結果
問題 |
No.938 賢人を探せ
|
ユーザー |
![]() |
提出日時 | 2019-12-16 18:17:10 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 444 bytes |
コンパイル時間 | 1,737 ms |
コンパイル使用メモリ | 174,016 KB |
実行使用メモリ | 5,504 KB |
最終ジャッジ日時 | 2024-07-02 20:23:26 |
合計ジャッジ時間 | 15,159 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 7 WA * 14 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<string> a(n); set<string> b; for(int i=0;i<n;i++){ string s; cin >> a[i] >> s; b.insert(s); } for(string t:b){ bool flag=true; for(int j=0;j<n;j++){ if(t==a[j]){ flag=false; } } if(flag){ cout << t << endl; } } }