結果

問題 No.1692 Expectations
ユーザー mmn15277198
提出日時 2021-10-03 01:25:08
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 497 bytes
コンパイル時間 942 ms
コンパイル使用メモリ 100,796 KB
実行使用メモリ 13,440 KB
最終ジャッジ日時 2024-07-20 20:31:02
合計ジャッジ時間 2,364 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <queue>
#include <map>
#include <cmath>
#include <iomanip>
using namespace std;
int main() {
  int n , m;
  cin >> n >> m;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int ans = 0;
  map<int,int> mp;
  for (int i = 0; i < n; i++) {
    mp[a[i]]++;
  }
  int mx = mp.size();
  int mn;
  if (mp.size() == 1) mn = 1;
  else mn = 0;
  cout << mx << " " << mn << endl;
  return 0;
}
0