結果
問題 |
No.1692 Expectations
|
ユーザー |
![]() |
提出日時 | 2021-09-30 19:24:44 |
言語 | C++17(clang) (17.0.6 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 57 ms / 2,000 ms |
コード長 | 425 bytes |
コンパイル時間 | 2,014 ms |
コンパイル使用メモリ | 163,544 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-19 10:18:29 |
合計ジャッジ時間 | 3,364 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; }