結果
| 問題 | No.1692 Expectations |
| コンテスト | |
| ユーザー |
mmn15277198
|
| 提出日時 | 2021-10-03 01:27:54 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 511 bytes |
| 記録 | |
| コンパイル時間 | 1,005 ms |
| コンパイル使用メモリ | 100,860 KB |
| 実行使用メモリ | 13,440 KB |
| 最終ジャッジ日時 | 2024-07-20 20:33:08 |
| 合計ジャッジ時間 | 2,674 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 2 WA * 18 |
ソースコード
#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 = max((int)mp.size() , m);
int mn;
if (mp.size() == 1) mn = 1;
else mn = 0;
cout << mx << " " << mn << endl;
return 0;
}
mmn15277198