結果
| 問題 | 
                            No.938 賢人を探せ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             plin92793134
                         | 
                    
| 提出日時 | 2019-12-18 23:52:07 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 26 ms / 2,000 ms | 
| コード長 | 1,104 bytes | 
| コンパイル時間 | 1,048 ms | 
| コンパイル使用メモリ | 110,740 KB | 
| 実行使用メモリ | 7,020 KB | 
| 最終ジャッジ日時 | 2024-12-14 11:54:00 | 
| 合計ジャッジ時間 | 2,158 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 21 | 
ソースコード
#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;
}
            
            
            
        
            
plin92793134