結果
| 問題 | No.1692 Expectations |
| コンテスト | |
| ユーザー |
eSeF
|
| 提出日時 | 2021-09-30 19:24:44 |
| 言語 | C++17(clang) (clang++ 22.1.8 + boost 1.92.0) |
| 結果 |
AC
|
| 実行時間 | 43 ms / 2,000 ms |
| + 551µs | |
| コード長 | 425 bytes |
| 記録 | |
| コンパイル時間 | 9,380 ms |
| コンパイル使用メモリ | 171,760 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-18 11:08:55 |
| 合計ジャッジ時間 | 7,116 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int N, M;
cin >> N >> M;
vector<int>cnt(M + 1, 0);
int type = 0;
for(int i = 0; i < N; i++){
int a; cin >> a;
cnt[a]++;
if(cnt[a] == 1){
type++;
}
}
if(type == 1 && N == M){
cout << type << " " << 1 << endl;
}
else{
cout << type << " " << 0 << endl;
}
return 0;
}
eSeF