結果
| 問題 |
No.2334 Distinct Cards
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-02 21:31:16 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 318 bytes |
| コンパイル時間 | 2,093 ms |
| コンパイル使用メモリ | 166,068 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-28 16:34:17 |
| 合計ジャッジ時間 | 3,446 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 22 |
ソースコード
#include<bits/stdc++.h>
typedef long long ll;
const int N=100100;
using namespace std;
int main()
{
ll n,m;
cin>>n>>m;
ll a[N];
for(int i=0;i<n;i++)
cin>>a[i];
ll cnt =0;
ll c[N];
for(int i=0;i<m;i++)
{
c[a[i]]++;
}
for(int i=0;i<N;i++)
{
if(c[i]!=0)
cnt++;
}
cout<<cnt<<endl;
return 0;
}