結果

問題 No.1692 Expectations
ユーザー KudeKude
提出日時 2021-10-01 21:23:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 181 ms / 2,000 ms
コード長 232 bytes
コンパイル時間 313 ms
コンパイル使用メモリ 86,772 KB
実行使用メモリ 138,272 KB
最終ジャッジ日時 2023-09-26 16:17:21
合計ジャッジ時間 3,811 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
70,992 KB
testcase_01 AC 78 ms
71,236 KB
testcase_02 AC 77 ms
71,076 KB
testcase_03 AC 77 ms
71,232 KB
testcase_04 AC 75 ms
70,860 KB
testcase_05 AC 79 ms
71,124 KB
testcase_06 AC 76 ms
71,124 KB
testcase_07 AC 76 ms
71,132 KB
testcase_08 AC 75 ms
71,224 KB
testcase_09 AC 74 ms
71,248 KB
testcase_10 AC 150 ms
128,884 KB
testcase_11 AC 140 ms
131,188 KB
testcase_12 AC 74 ms
71,312 KB
testcase_13 AC 75 ms
71,228 KB
testcase_14 AC 106 ms
97,132 KB
testcase_15 AC 152 ms
133,940 KB
testcase_16 AC 100 ms
92,948 KB
testcase_17 AC 134 ms
119,316 KB
testcase_18 AC 118 ms
110,676 KB
testcase_19 AC 181 ms
138,272 KB
testcase_20 AC 143 ms
131,312 KB
testcase_21 AC 170 ms
138,272 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m = map(int, input().split())
a = list(map(int, input().split()))
rest = set(range(1, m + 1))
mx = 0
for x in a:
    if x in rest:
        rest.remove(x)
        mx += 1

mn = 1 if n == m and len(set(a)) == 1 else 0
print(mx, mn)
0