結果

問題 No.2334 Distinct Cards
ユーザー Ray otaku
提出日時 2023-06-07 14:40:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 236 bytes
コンパイル時間 1,811 ms
コンパイル使用メモリ 172,088 KB
実行使用メモリ 8,320 KB
最終ジャッジ日時 2024-12-29 19:40:39
合計ジャッジ時間 3,737 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 1
other AC * 7 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
	int n, k;
	cin >> n >> k;
	vector<int> a(n + 1);
	set<int> s;
	for (int i = 1; i <= n; ++i) {
		cin >> a[i];
		s.insert(a[i]);
	}
	cout << min(k, (int)s.size());
	return 0;
}
0