結果

問題 No.938 賢人を探せ
ユーザー plin92793134plin92793134
提出日時 2019-12-18 23:52:07
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 1,104 bytes
コンパイル時間 1,126 ms
コンパイル使用メモリ 109,668 KB
実行使用メモリ 6,832 KB
最終ジャッジ日時 2023-08-21 03:40:59
合計ジャッジ時間 2,544 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
6,804 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 18 ms
5,580 KB
testcase_09 AC 18 ms
5,480 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 24 ms
5,376 KB
testcase_12 AC 17 ms
4,972 KB
testcase_13 AC 17 ms
4,888 KB
testcase_14 AC 17 ms
4,952 KB
testcase_15 AC 17 ms
4,884 KB
testcase_16 AC 17 ms
4,956 KB
testcase_17 AC 17 ms
4,844 KB
testcase_18 AC 17 ms
4,852 KB
testcase_19 AC 17 ms
4,948 KB
testcase_20 AC 16 ms
4,848 KB
testcase_21 AC 17 ms
4,964 KB
testcase_22 AC 23 ms
6,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <queue>
#include <map>
#include <numeric>
#include <unordered_map>
#include <iomanip>
#include <functional>
#include <bitset>
#include <complex>
#include <stack>
#include <cstdint>



#define rep(i, n) for(ll i = 0; i < (ll)(n); i++)
#define rrep(i, n) for(ll i = (ll)(n-1); i >= 0; i--)
#define repi(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define rrepi(i,a,b) for(ll i=(ll)(b);i>=(ll)(a);i--)

#define all(x) (x).begin(),(x).end()

template<class T>inline bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>inline bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

typedef long long ll;

using namespace std;


int main()
{
  ios::sync_with_stdio(false);
  cin.tie(0);
  set<string>ma;
  vector<string>s;
  ll q;cin>>q;
  rep(i,q){
    string a,b;cin>>a>>b;
    ma.insert(a);
    s.push_back(b);
  }
  for(auto ts:s){
    if(!ma.count(ts))cout<<ts<<"\n";
    ma.insert(ts);
  }
  cout<<flush;

  return 0;

}
0