結果
| 問題 |
No.2334 Distinct Cards
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-02 21:29:54 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 321 bytes |
| コンパイル時間 | 1,957 ms |
| コンパイル使用メモリ | 166,416 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-28 16:31:19 |
| 合計ジャッジ時間 | 2,889 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
int a[N];
for(int i=0;i<n;i++)
cin>>a[i];
int cnt =0;
int 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;
}