結果
問題 |
No.1692 Expectations
|
ユーザー |
![]() |
提出日時 | 2021-09-14 08:50:16 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 64 ms / 2,000 ms |
コード長 | 436 bytes |
コンパイル時間 | 2,147 ms |
コンパイル使用メモリ | 192,960 KB |
最終ジャッジ日時 | 2025-01-24 13:52:53 |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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); for(int i = 0; i < N; i++){ int a; cin >> a; cnt[a]++; } int type = 0; for(int i = 1; i <= M; i++){ if(cnt[i] == N && N == M){ cout << 1 << " " << 1 << endl; return 0; } if(cnt[i] > 0) type++; } cout << type << " " << 0 << endl; return 0; }