結果

問題 No.2334 Distinct Cards
ユーザー RikuohRikuoh
提出日時 2023-06-07 22:08:18
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 478 bytes
コンパイル時間 4,331 ms
コンパイル使用メモリ 233,536 KB
実行使用メモリ 8,188 KB
最終ジャッジ日時 2023-08-28 18:50:05
合計ジャッジ時間 4,969 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 1 ms
4,380 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 35 ms
4,380 KB
testcase_18 AC 45 ms
5,784 KB
testcase_19 AC 59 ms
8,188 KB
testcase_20 AC 29 ms
4,380 KB
testcase_21 AC 28 ms
4,376 KB
testcase_22 AC 29 ms
4,376 KB
testcase_23 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
#define rep(i,a,b) for(int i = a; i < b; ++i)
#define rrep(i,a,b) for(int i = a; i >= b; --i)
#define all(x) (x).begin(),(x).end()
const int MOD = 998244353;

int main(){
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  rep(i,0,n) cin >> a[i];
  sort(all(a));
  set<int> st;
  rep(i,0,k){
    st.insert(a[i]);
  }

  cout << st.size() << endl;
  
  return 0;
}
0