結果

問題 No.938 賢人を探せ
ユーザー toto6114toto6114
提出日時 2019-12-14 13:55:57
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 868 bytes
コンパイル時間 1,095 ms
コンパイル使用メモリ 100,660 KB
実行使用メモリ 18,944 KB
最終ジャッジ日時 2024-05-08 09:07:30
合計ジャッジ時間 2,438 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 55 ms
18,944 KB
testcase_01 AC 12 ms
15,872 KB
testcase_02 AC 12 ms
16,000 KB
testcase_03 AC 12 ms
15,872 KB
testcase_04 AC 12 ms
16,000 KB
testcase_05 AC 12 ms
15,872 KB
testcase_06 AC 12 ms
15,872 KB
testcase_07 AC 12 ms
16,000 KB
testcase_08 AC 24 ms
17,152 KB
testcase_09 AC 25 ms
17,408 KB
testcase_10 AC 12 ms
15,872 KB
testcase_11 AC 28 ms
17,536 KB
testcase_12 AC 27 ms
17,280 KB
testcase_13 AC 26 ms
17,280 KB
testcase_14 AC 27 ms
17,280 KB
testcase_15 AC 26 ms
17,280 KB
testcase_16 AC 27 ms
17,280 KB
testcase_17 AC 27 ms
17,536 KB
testcase_18 AC 27 ms
17,280 KB
testcase_19 AC 27 ms
17,408 KB
testcase_20 AC 26 ms
17,408 KB
testcase_21 AC 27 ms
17,280 KB
testcase_22 AC 60 ms
18,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

//   _/                _/                 _/_/_/   _/
//_/_/_/_/   _/_/   _/_/_/_/   _/_/    _/       _/_/
// _/     _/    _/   _/     _/    _/  _/_/_/     _/
//_/     _/    _/   _/     _/    _/  _/    _/   _/
// _/_/   _/_/       _/_/   _/_/      _/_/     _/
#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<set>
#include<map>
#include<queue>
#include<vector>
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
const int inf=1e9;
const ll INF=1e18;
const double pi=3.1415926535897932384626433832;
int main() {
  cin.tie(0),cout.tie(0);
  ios::sync_with_stdio(false);
  int n;
  string s[200005]={},t[200005]={};
  cin >> n;
  map<string,int> m;
  for(int i=0; i<n; i++) {
    cin >> s[i] >> t[i];
    m[s[i]]=1;
  }
  for(int i=0; i<n; i++) {
    if(!m[t[i]]) {
      cout << t[i] << endl;
      m[t[i]]=1;
    }
  }
}


0