結果
問題 | No.1692 Expectations |
ユーザー |
![]() |
提出日時 | 2023-12-26 16:50:18 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 358 bytes |
コンパイル時間 | 271 ms |
コンパイル使用メモリ | 82,492 KB |
実行使用メモリ | 141,180 KB |
最終ジャッジ日時 | 2024-09-27 15:13:24 |
合計ジャッジ時間 | 3,300 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 4 WA * 16 |
ソースコード
from collections import *n,m = map(int,input().split())a = list(map(int,input().split()))d = defaultdict(list)for i in range(n):d[a[i]].append(i)ma = nfor i in range(1,m+1):if len(d[i]) >= 2:ma -= 1if n == m:s = set(a)if len(s) == 1:mi = 1else:mi = 0else:mi = 0print(ma,mi)