結果

問題 No.1390 Get together
ユーザー 小野寺健小野寺健
提出日時 2021-05-24 14:34:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 819,584 KB
最終ジャッジ日時 2024-04-21 00:31:58
合計ジャッジ時間 9,248 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,624 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 28 ms
10,752 KB
testcase_03 AC 651 ms
118,016 KB
testcase_04 AC 451 ms
82,944 KB
testcase_05 WA -
testcase_06 AC 534 ms
98,304 KB
testcase_07 WA -
testcase_08 AC 507 ms
91,136 KB
testcase_09 AC 776 ms
143,232 KB
testcase_10 AC 28 ms
10,496 KB
testcase_11 AC 27 ms
10,752 KB
testcase_12 AC 26 ms
10,880 KB
testcase_13 WA -
testcase_14 AC 27 ms
10,752 KB
testcase_15 AC 28 ms
10,624 KB
testcase_16 WA -
testcase_17 MLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())

D = dict()
for _ in range(N):
    b, c = map(int, input().split())
    if c not in D:
        D[c] = [0] * M
    D[c][b-1] += 1

cnt = 0    
for v in D.values():
    cnt += sum(v) - max(v)
    
print(cnt)
0