結果

問題 No.1692 Expectations
ユーザー bonKotsubonKotsu
提出日時 2022-07-21 19:37:54
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 830 bytes
コンパイル時間 4,149 ms
コンパイル使用メモリ 264,752 KB
実行使用メモリ 12,832 KB
最終ジャッジ日時 2023-09-16 01:44:12
合計ジャッジ時間 6,307 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 50 ms
4,376 KB
testcase_11 AC 49 ms
4,376 KB
testcase_12 AC 2 ms
4,380 KB
testcase_13 WA -
testcase_14 AC 10 ms
4,384 KB
testcase_15 AC 114 ms
8,488 KB
testcase_16 AC 10 ms
4,380 KB
testcase_17 AC 51 ms
6,724 KB
testcase_18 AC 19 ms
4,872 KB
testcase_19 AC 164 ms
9,388 KB
testcase_20 AC 95 ms
11,252 KB
testcase_21 AC 113 ms
12,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#include <atcoder/all>
using namespace atcoder;

#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define P pair<int, int>
#define LP pair<ll, ll>
#define fi first
#define se second
#define pb push_back
#define eb emplace_back
#define all(s) s.begin(), s.end()
#define rall(s) s.rbegin(), s.rend()
template<class T>
void chmax(T& a, T b) { a = max(a, b); };
template<class T>
void chmin(T& a, T b) { a = min(a, b); };

int main() {
  int n, m;
  cin >> n >> m;
  if (n == 1) {
    if (m == 1) cout << 1 << " " << 1 << endl;
    else cout << 1 << " " << 0 << endl;
    return 0;
  }

  set<int> a;
  rep(i,n) {
    int x;
    cin >> x;
    a.insert(x);
  };
  int mx = a.size(), mn = 0;
  if (a.size() == 1) mn = 1;
  cout << mx << " " << mn << endl;

  return 0;
}
0