結果

問題 No.938 賢人を探せ
ユーザー CleyLCleyL
提出日時 2019-12-01 00:06:48
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 408 bytes
コンパイル時間 988 ms
コンパイル使用メモリ 80,236 KB
実行使用メモリ 8,528 KB
最終ジャッジ日時 2024-05-01 03:25:43
合計ジャッジ時間 2,198 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
8,400 KB
testcase_01 WA -
testcase_02 AC 2 ms
6,944 KB
testcase_03 WA -
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,944 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 29 ms
6,944 KB
testcase_09 AC 31 ms
6,944 KB
testcase_10 AC 2 ms
6,940 KB
testcase_11 AC 41 ms
6,988 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 62 ms
8,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <set>
#include <vector>
using namespace std;
int main(){
  int n;cin>>n;
  set<string> s1;
  vector<string> s2;
  set<string> sa;
  for(int i = 0; n > i; i++){
    string a,b;cin>>a>>b;
    s1.insert(a);
    s2.push_back(b);
    sa.insert(a);
    sa.insert(b);
  }
  for(int i = 0; s2.size() > i; i++){
    if(s1.find(s2[i]) == s1.end()){
      cout << s2[i] << endl;
    }
  }
}
0