結果

問題 No.1692 Expectations
ユーザー nephrologistnephrologist
提出日時 2021-10-01 21:27:52
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 315 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 86,944 KB
実行使用メモリ 174,188 KB
最終ジャッジ日時 2023-09-26 16:26:54
合計ジャッジ時間 4,251 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
71,556 KB
testcase_01 WA -
testcase_02 AC 93 ms
71,496 KB
testcase_03 AC 94 ms
71,364 KB
testcase_04 AC 95 ms
71,520 KB
testcase_05 AC 95 ms
71,076 KB
testcase_06 AC 94 ms
71,640 KB
testcase_07 AC 93 ms
71,380 KB
testcase_08 AC 94 ms
71,420 KB
testcase_09 WA -
testcase_10 AC 141 ms
104,456 KB
testcase_11 WA -
testcase_12 AC 93 ms
71,500 KB
testcase_13 WA -
testcase_14 AC 135 ms
80,728 KB
testcase_15 AC 194 ms
138,588 KB
testcase_16 AC 113 ms
80,868 KB
testcase_17 AC 152 ms
110,536 KB
testcase_18 AC 120 ms
87,392 KB
testcase_19 WA -
testcase_20 AC 192 ms
158,968 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

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
print(kind,ans_mn)
0