結果
| 問題 | No.1692 Expectations |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-10-02 20:45:57 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 2,000 ms |
| コード長 | 327 bytes |
| 記録 | |
| コンパイル時間 | 2,125 ms |
| コンパイル使用メモリ | 193,624 KB |
| 最終ジャッジ日時 | 2025-01-24 20:03:17 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int n, m, s, t = 0;
int a[200000];
int main()
{
cin >> n >> m;
for (int i = 0; i < n; i++)
cin >> a[i];
sort(a, a + n);
s = n;
if (n == m && a[0] == a[n - 1])
t = 1;
for (int i = 0; i < n - 1; i++)
if (a[i] == a[i + 1])
s--;
cout << s << " " << t << endl;
}