結果
問題 | No.1692 Expectations |
ユーザー |
![]() |
提出日時 | 2021-10-01 21:52:52 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 164 ms / 2,000 ms |
コード長 | 359 bytes |
コンパイル時間 | 224 ms |
コンパイル使用メモリ | 82,048 KB |
実行使用メモリ | 143,804 KB |
最終ジャッジ日時 | 2024-07-19 11:05:59 |
合計ジャッジ時間 | 2,730 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
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)