結果

問題 No.938 賢人を探せ
ユーザー ππ
提出日時 2019-12-13 23:07:36
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 590 bytes
コンパイル時間 2,224 ms
コンパイル使用メモリ 154,232 KB
実行使用メモリ 16,992 KB
最終ジャッジ日時 2023-09-10 04:43:32
合計ジャッジ時間 8,536 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define INF 1000000000
#define MOD 1000000007
#define FOR(i, a, b) for(int i = (int)(a); i < (int)(b); i++)
#define REP(i, b) FOR(i, 0, b)
#define ALL(x) (x).begin(),(x).end()
typedef long long ll;

int main() {
  int n;
  set<string> a;
  vector<string> b;
  cin >> n;
  REP(i, n) {
    string str;
    cin >> str;
    a.insert(str);
    cin >> str;
    if(find(ALL(b), str) == b.end()) {
      b.push_back(str);
    }
  }
  int size = b.size();
  REP(i, size) {
    if(find(ALL(a), b[i]) == a.end()) {
      cout << b[i] << endl;
    }
  }
}
0