結果

問題 No.938 賢人を探せ
ユーザー 沙耶花
提出日時 2019-12-01 11:12:58
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 56 ms / 2,000 ms
コード長 444 bytes
コンパイル時間 2,080 ms
コンパイル使用メモリ 175,992 KB
実行使用メモリ 7,648 KB
最終ジャッジ日時 2024-12-14 11:43:26
合計ジャッジ時間 3,255 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define modulo 1000000007
#define mod(mod_x) ((((long long)mod_x+modulo))%modulo)
#define Inf 10000000



int main(){
	
	int N;
	cin>>N;
	
	vector<string> A,B;
	
	set<string> S;
	
	for(int i=0;i<N;i++){
		string a,b;
		cin>>a>>b;
		A.push_back(a);
		B.push_back(b);
		S.insert(a);
	}
	
	for(int i=0;i<N;i++){
		if(S.count(B[i])==false){
			cout<<B[i]<<endl;
			S.insert(B[i]);
		}
	}
	
	return 0;
}
0