結果

問題 No.1390 Get together
ユーザー 310icecrystal310icecrystal
提出日時 2023-05-01 20:23:14
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 235 bytes
コンパイル時間 367 ms
コンパイル使用メモリ 82,240 KB
実行使用メモリ 112,888 KB
最終ジャッジ日時 2024-04-30 19:19:20
合計ジャッジ時間 8,874 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,888 KB
testcase_01 AC 40 ms
53,400 KB
testcase_02 AC 39 ms
52,620 KB
testcase_03 AC 71 ms
72,480 KB
testcase_04 AC 70 ms
72,540 KB
testcase_05 WA -
testcase_06 AC 70 ms
73,364 KB
testcase_07 WA -
testcase_08 AC 71 ms
72,128 KB
testcase_09 AC 74 ms
73,480 KB
testcase_10 AC 40 ms
52,312 KB
testcase_11 AC 38 ms
52,892 KB
testcase_12 AC 40 ms
52,068 KB
testcase_13 WA -
testcase_14 AC 40 ms
52,532 KB
testcase_15 AC 39 ms
53,088 KB
testcase_16 AC 219 ms
95,884 KB
testcase_17 AC 337 ms
112,756 KB
testcase_18 AC 219 ms
100,828 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 344 ms
112,456 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 358 ms
112,404 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

color = [set() for _ in range(N+1)]
for i in range(N):
    b,c = map(int,input().split())
    color[c].add(b)

ans = 0
for i in range(1,N+1):
    if color[i]:
        ans += len(color[i]) - 1
print(ans)
0