結果

問題 No.1390 Get together
ユーザー NoneNone
提出日時 2021-05-04 23:28:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 300 bytes
コンパイル時間 1,537 ms
コンパイル使用メモリ 86,924 KB
実行使用メモリ 130,384 KB
最終ジャッジ日時 2023-10-01 00:55:13
合計ジャッジ時間 12,431 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
71,612 KB
testcase_01 AC 93 ms
71,244 KB
testcase_02 AC 90 ms
71,684 KB
testcase_03 AC 154 ms
77,928 KB
testcase_04 AC 131 ms
77,772 KB
testcase_05 WA -
testcase_06 AC 130 ms
77,980 KB
testcase_07 WA -
testcase_08 AC 131 ms
77,936 KB
testcase_09 AC 136 ms
77,960 KB
testcase_10 AC 91 ms
71,752 KB
testcase_11 AC 91 ms
71,260 KB
testcase_12 AC 91 ms
71,664 KB
testcase_13 WA -
testcase_14 AC 91 ms
71,260 KB
testcase_15 AC 91 ms
71,392 KB
testcase_16 WA -
testcase_17 AC 424 ms
128,012 KB
testcase_18 AC 271 ms
97,388 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 415 ms
130,164 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 425 ms
130,244 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0