結果

問題 No.1692 Expectations
ユーザー rtyurtyu
提出日時 2021-10-13 09:51:16
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 338 bytes
コンパイル時間 547 ms
コンパイル使用メモリ 65,812 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-10-17 19:02:56
合計ジャッジ時間 2,667 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 18 ms
4,348 KB
testcase_11 AC 18 ms
4,348 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 4 ms
4,348 KB
testcase_15 AC 20 ms
4,360 KB
testcase_16 AC 4 ms
4,348 KB
testcase_17 AC 12 ms
4,348 KB
testcase_18 AC 6 ms
4,364 KB
testcase_19 AC 24 ms
4,388 KB
testcase_20 AC 18 ms
4,348 KB
testcase_21 AC 21 ms
4,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;

int c[200009];

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n, m; cin >> n >> m;
	int mx = 0, mn = 0;
	for (int i = 1; i <= n; i++) {
		int a; cin >> a;
		c[a]++;
		if (c[a] == 1) mx++;
		if (c[a] == n) mn++;
	}
	cout << mx << " " << mn << '\n';
	return 0;
}
0