結果

問題 No.1390 Get together
ユーザー roarisroaris
提出日時 2021-02-12 23:11:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 275 bytes
コンパイル時間 913 ms
コンパイル使用メモリ 87,060 KB
実行使用メモリ 114,328 KB
最終ジャッジ日時 2023-09-27 06:31:35
合計ジャッジ時間 8,285 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
71,772 KB
testcase_01 AC 88 ms
71,420 KB
testcase_02 AC 90 ms
71,852 KB
testcase_03 AC 102 ms
77,796 KB
testcase_04 AC 106 ms
77,660 KB
testcase_05 WA -
testcase_06 AC 108 ms
77,980 KB
testcase_07 WA -
testcase_08 AC 103 ms
77,696 KB
testcase_09 AC 103 ms
77,796 KB
testcase_10 AC 89 ms
71,428 KB
testcase_11 AC 92 ms
71,436 KB
testcase_12 AC 90 ms
71,680 KB
testcase_13 WA -
testcase_14 AC 90 ms
71,796 KB
testcase_15 AC 90 ms
71,600 KB
testcase_16 AC 166 ms
101,404 KB
testcase_17 AC 244 ms
97,356 KB
testcase_18 AC 174 ms
114,328 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 247 ms
97,372 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 249 ms
97,328 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():
    ans += len(set(v))-1

print(ans)
0