結果

問題 No.1692 Expectations
ユーザー icchiposticchipost
提出日時 2021-10-22 18:40:21
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 447 bytes
コンパイル時間 1,673 ms
コンパイル使用メモリ 173,236 KB
実行使用メモリ 13,672 KB
最終ジャッジ日時 2023-10-24 05:28:02
合計ジャッジ時間 3,648 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 57 ms
4,348 KB
testcase_11 AC 55 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 11 ms
4,552 KB
testcase_15 AC 104 ms
9,184 KB
testcase_16 AC 11 ms
4,560 KB
testcase_17 AC 51 ms
6,896 KB
testcase_18 AC 20 ms
5,164 KB
testcase_19 AC 135 ms
9,976 KB
testcase_20 AC 98 ms
12,088 KB
testcase_21 AC 115 ms
13,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0