結果

問題 No.938 賢人を探せ
ユーザー ianCKianCK
提出日時 2019-12-10 04:00:11
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 403 bytes
コンパイル時間 730 ms
コンパイル使用メモリ 70,200 KB
実行使用メモリ 6,892 KB
最終ジャッジ日時 2024-05-08 09:04:25
合計ジャッジ時間 2,036 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
6,888 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 13 ms
5,484 KB
testcase_09 AC 14 ms
5,480 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 AC 19 ms
5,480 KB
testcase_12 AC 15 ms
5,376 KB
testcase_13 AC 15 ms
5,376 KB
testcase_14 AC 16 ms
5,376 KB
testcase_15 AC 16 ms
5,376 KB
testcase_16 AC 16 ms
5,376 KB
testcase_17 AC 16 ms
5,376 KB
testcase_18 AC 16 ms
5,376 KB
testcase_19 AC 16 ms
5,376 KB
testcase_20 AC 15 ms
5,376 KB
testcase_21 AC 15 ms
5,376 KB
testcase_22 AC 46 ms
6,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <set>
#include <vector>
using namespace std;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n;
	string s;
	set<string> bad;
	vector<string> good;
	cin >> n;
	while (n--) {
		cin >> s;
		bad.insert(s);
		cin >> s;
		good.push_back(s);
	}
	for (string i : good) if (bad.find(i) == bad.end()) {
		cout << i << endl;
		bad.insert(i);
	}
}
0