結果
| 問題 | 
                            No.938 賢人を探せ
                             | 
                    
| コンテスト | |
| ユーザー | 
                             hirokazu1020
                         | 
                    
| 提出日時 | 2019-12-06 00:34:27 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 45 ms / 2,000 ms | 
| コード長 | 933 bytes | 
| コンパイル時間 | 1,156 ms | 
| コンパイル使用メモリ | 105,176 KB | 
| 実行使用メモリ | 7,308 KB | 
| 最終ジャッジ日時 | 2024-12-14 11:48:41 | 
| 合計ジャッジ時間 | 2,274 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 21 | 
ソースコード
#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<numeric>
#include<functional>
#include<algorithm>
#include<bitset>
#include<tuple>
#include<unordered_set>
#include<unordered_map>
#include<random>
#include<array>
#include<cassert>
using namespace std;
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define uniq(v) v.erase(unique(all(v)),v.end())
int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n;
	unordered_set<string> c;
	vector<string> all;
	cin >> n;
	rep(i, n) {
		string a, b;
		cin >> a >> b;
		all.push_back(a);
		all.push_back(b);
		c.insert(a);
	}
	for (const string &s : all) {
		if (c.count(s) == 0) {
			cout << s << endl;
			c.insert(s);
		}
	}
	return 0;
}
            
            
            
        
            
hirokazu1020