結果

問題 No.938 賢人を探せ
ユーザー toto6114toto6114
提出日時 2019-12-14 13:55:57
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 868 bytes
コンパイル時間 963 ms
コンパイル使用メモリ 100,804 KB
実行使用メモリ 19,068 KB
最終ジャッジ日時 2023-08-21 03:39:32
合計ジャッジ時間 2,482 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
18,992 KB
testcase_01 AC 7 ms
15,928 KB
testcase_02 AC 6 ms
15,932 KB
testcase_03 AC 7 ms
15,888 KB
testcase_04 AC 7 ms
16,008 KB
testcase_05 AC 7 ms
15,920 KB
testcase_06 AC 6 ms
15,992 KB
testcase_07 AC 7 ms
15,888 KB
testcase_08 AC 18 ms
17,456 KB
testcase_09 AC 18 ms
17,576 KB
testcase_10 AC 7 ms
15,852 KB
testcase_11 AC 23 ms
17,496 KB
testcase_12 AC 21 ms
17,252 KB
testcase_13 AC 21 ms
17,252 KB
testcase_14 AC 21 ms
17,256 KB
testcase_15 AC 20 ms
17,252 KB
testcase_16 AC 21 ms
17,240 KB
testcase_17 AC 22 ms
17,288 KB
testcase_18 AC 21 ms
17,264 KB
testcase_19 AC 21 ms
17,244 KB
testcase_20 AC 21 ms
17,316 KB
testcase_21 AC 20 ms
17,260 KB
testcase_22 AC 53 ms
19,068 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