結果

問題 No.938 賢人を探せ
ユーザー tempura_pptempura_pp
提出日時 2019-12-01 00:02:18
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 700 bytes
コンパイル時間 904 ms
コンパイル使用メモリ 103,208 KB
実行使用メモリ 7,108 KB
最終ジャッジ日時 2023-08-21 03:24:02
合計ジャッジ時間 2,336 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
7,108 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 19 ms
5,236 KB
testcase_09 AC 20 ms
5,316 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 25 ms
5,592 KB
testcase_12 AC 21 ms
5,308 KB
testcase_13 AC 21 ms
5,392 KB
testcase_14 AC 21 ms
5,216 KB
testcase_15 AC 22 ms
5,304 KB
testcase_16 AC 21 ms
5,284 KB
testcase_17 AC 21 ms
5,268 KB
testcase_18 AC 21 ms
5,268 KB
testcase_19 AC 21 ms
5,320 KB
testcase_20 AC 21 ms
5,292 KB
testcase_21 AC 21 ms
5,248 KB
testcase_22 AC 51 ms
7,104 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

int main(){
	int n;
	cin>>n;
	string s[n];
	set<string> st;
	rep(i,n){
		string t;
		cin>>t>>s[i];
		st.insert(t);
	}
	rep(i,n){
		if(st.find(s[i])==st.end()){
			cout<<s[i]<<endl;
		}
		st.insert(s[i]);
	}
	return 0;
}
0