結果
問題 | No.1390 Get together |
ユーザー |
|
提出日時 | 2021-05-04 23:28:49 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 300 bytes |
コンパイル時間 | 708 ms |
コンパイル使用メモリ | 82,208 KB |
実行使用メモリ | 127,176 KB |
最終ジャッジ日時 | 2024-07-23 18:30:07 |
合計ジャッジ時間 | 10,049 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 WA * 15 |
ソースコード
from collections import defaultdict N,M=map(int, input().split()) C=defaultdict(lambda: defaultdict(int)) for _ in range(N): b,c=map(int, input().split()) C[c][b]+=1 res=0 for _,d in C.items(): m=0 s=0 for k,v in d.items(): m=max(v,m) s+=v res+=s-m print(res)