結果
問題 |
No.1692 Expectations
|
ユーザー |
|
提出日時 | 2021-10-22 18:40:21 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 125 ms / 2,000 ms |
コード長 | 447 bytes |
コンパイル時間 | 1,770 ms |
コンパイル使用メモリ | 172,572 KB |
実行使用メモリ | 13,312 KB |
最終ジャッジ日時 | 2024-09-22 22:20:08 |
合計ジャッジ時間 | 3,257 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using pii = pair<int, int>; int main() { int n, m; cin >> n >> m; vector<int> a(n); rep(i, n) cin >> a[i]; if (m == 1) { cout << 1 << " " << 1 << endl; return 0; } set<int> st; rep(i, n) st.insert(a[i]); int mx = st.size(); int mn = (mx == 1 && n == m); cout << mx << " " << mn << endl; return 0; }