結果
問題 |
No.1692 Expectations
|
ユーザー |
![]() |
提出日時 | 2023-12-26 21:51:08 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 192 ms / 2,000 ms |
コード長 | 330 bytes |
コンパイル時間 | 252 ms |
コンパイル使用メモリ | 82,312 KB |
実行使用メモリ | 141,336 KB |
最終ジャッジ日時 | 2024-09-27 15:17:02 |
合計ジャッジ時間 | 3,469 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
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 = n mi = 0 for i in range(1,m+1): if len(d[i]) >= 2: ma -= (len(d[i])-1) if n == m: s = set(a) if len(s) == 1: mi = 1 print(ma,mi)