結果

問題 No.1390 Get together
ユーザー roarisroaris
提出日時 2021-02-12 23:10:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 318 bytes
コンパイル時間 767 ms
コンパイル使用メモリ 87,128 KB
実行使用メモリ 112,212 KB
最終ジャッジ日時 2023-09-27 06:29:54
合計ジャッジ時間 8,144 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 86 ms
71,780 KB
testcase_01 AC 82 ms
71,484 KB
testcase_02 AC 82 ms
71,896 KB
testcase_03 AC 122 ms
78,644 KB
testcase_04 AC 122 ms
78,396 KB
testcase_05 WA -
testcase_06 AC 120 ms
78,380 KB
testcase_07 WA -
testcase_08 AC 124 ms
77,992 KB
testcase_09 AC 126 ms
78,776 KB
testcase_10 AC 85 ms
71,676 KB
testcase_11 AC 84 ms
71,420 KB
testcase_12 AC 84 ms
71,776 KB
testcase_13 WA -
testcase_14 AC 82 ms
71,508 KB
testcase_15 AC 83 ms
71,768 KB
testcase_16 WA -
testcase_17 AC 303 ms
98,660 KB
testcase_18 AC 177 ms
112,212 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 301 ms
98,308 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 291 ms
98,444 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import *

N, M = map(int, input().split())
slime = defaultdict(list)

for _ in range(N):
    b, c = map(int, input().split())
    slime[c].append(b)

ans = 0

for v in slime.values():
    cnt = Counter(v)
    ans += sum(cnt.values())-max(cnt.values())

print(ans)
0