結果

問題 No.1692 Expectations
ユーザー nephrologistnephrologist
提出日時 2021-10-01 21:52:52
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 216 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 86,828 KB
実行使用メモリ 173,672 KB
最終ジャッジ日時 2023-09-26 17:05:29
合計ジャッジ時間 4,538 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
71,332 KB
testcase_01 AC 94 ms
71,444 KB
testcase_02 AC 97 ms
71,212 KB
testcase_03 AC 94 ms
71,344 KB
testcase_04 AC 97 ms
71,000 KB
testcase_05 AC 96 ms
71,268 KB
testcase_06 AC 94 ms
71,312 KB
testcase_07 AC 97 ms
71,444 KB
testcase_08 AC 94 ms
71,496 KB
testcase_09 AC 96 ms
71,412 KB
testcase_10 AC 144 ms
104,536 KB
testcase_11 AC 141 ms
104,280 KB
testcase_12 AC 98 ms
71,572 KB
testcase_13 AC 100 ms
71,448 KB
testcase_14 AC 116 ms
80,352 KB
testcase_15 AC 206 ms
138,300 KB
testcase_16 AC 118 ms
80,888 KB
testcase_17 AC 154 ms
110,456 KB
testcase_18 AC 125 ms
87,520 KB
testcase_19 AC 216 ms
146,784 KB
testcase_20 AC 195 ms
158,792 KB
testcase_21 AC 203 ms
173,672 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

n,m=map(int,input().split())
A=list(map(int,input().split()))
memo=defaultdict(int)
memoset=set()
for i in range(n):
    memo[A[i]]+=1
    memoset.add(A[i])    

kind = len(list(memoset))
ans_mn=0
for key,val in memo.items():
    if val>m-n:
        ans_mn+=1
if m==n and kind==1:
    print(kind,1)
else:
    print(kind,0)
0