結果
問題 |
No.1692 Expectations
|
ユーザー |
|
提出日時 | 2022-06-04 20:30:46 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 77 ms / 2,000 ms |
コード長 | 461 bytes |
コンパイル時間 | 1,856 ms |
コンパイル使用メモリ | 199,044 KB |
最終ジャッジ日時 | 2025-01-29 18:11:35 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) typedef long long ll; using namespace std; int main() { cin.tie(0); ios_base::sync_with_stdio(false); int N, M; cin >> N >> M; vector<int> A(N); rep(i, N) cin >> A[i]; set<int> st; rep(i, N) st.insert(A[i]); cout << st.size() << " "; if (N == M && st.size() == 1) cout << 1; else cout << 0; cout << "\n"; return 0; }