結果

問題 No.1692 Expectations
ユーザー DMoRanSkyDMoRanSky
提出日時 2021-10-01 21:28:52
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 805 bytes
コンパイル時間 1,490 ms
コンパイル使用メモリ 164,844 KB
実行使用メモリ 5,228 KB
最終ジャッジ日時 2023-09-26 16:27:10
合計ジャッジ時間 2,777 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 WA -
testcase_09 AC 2 ms
4,376 KB
testcase_10 WA -
testcase_11 AC 6 ms
4,380 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 3 ms
4,376 KB
testcase_15 AC 9 ms
4,948 KB
testcase_16 AC 3 ms
4,376 KB
testcase_17 AC 7 ms
4,536 KB
testcase_18 AC 4 ms
4,376 KB
testcase_19 AC 10 ms
5,228 KB
testcase_20 AC 8 ms
4,800 KB
testcase_21 AC 9 ms
5,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// Skyqwq
#include <bits/stdc++.h>

#define pb push_back
#define fi first
#define se second
#define mp make_pair

using namespace std;

typedef long long LL;

template <typename T> void chkMax(T &x, T y) { if (y > x) x = y; }
template <typename T> void chkMin(T &x, T y) { if (y < x) x = y; }

template <typename T> void inline read(T &x) {
    int f = 1; x = 0; char s = getchar();
    while (s < '0' || s > '9') { if (s == '-') f = -1; s = getchar(); }
    while (s <= '9' && s >= '0') x = x * 10 + (s ^ 48), s = getchar();
    x *= f;
}

const int N = 2e5 + 5;

int n, m, a[N], c[N];
 
int main() {
	read(n), read(m);
	int cnt = 0;
	for (int i = 1; i <= n; i++) {
		read(a[i]);
		if (!c[a[i]]) cnt++;
		c[a[i]]++;
	}
	int v = 0;
	if (n == m && c[1] == n) v = 1;
	printf("%d %d\n", cnt, v);
	return 0;
}
0