結果

問題 No.1390 Get together
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2021-05-11 10:57:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 238 bytes
コンパイル時間 427 ms
コンパイル使用メモリ 81,604 KB
実行使用メモリ 111,928 KB
最終ジャッジ日時 2023-10-21 15:06:15
合計ジャッジ時間 7,790 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,364 KB
testcase_01 AC 36 ms
53,364 KB
testcase_02 AC 35 ms
53,364 KB
testcase_03 AC 66 ms
72,760 KB
testcase_04 AC 67 ms
72,760 KB
testcase_05 WA -
testcase_06 AC 66 ms
72,760 KB
testcase_07 WA -
testcase_08 AC 67 ms
72,760 KB
testcase_09 AC 66 ms
72,832 KB
testcase_10 AC 35 ms
53,364 KB
testcase_11 AC 35 ms
53,364 KB
testcase_12 AC 36 ms
53,364 KB
testcase_13 WA -
testcase_14 AC 36 ms
53,364 KB
testcase_15 AC 35 ms
53,364 KB
testcase_16 AC 206 ms
95,756 KB
testcase_17 AC 341 ms
111,908 KB
testcase_18 AC 212 ms
100,608 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 339 ms
111,908 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 345 ms
111,868 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m = map(int,input().split())
l = [set() for i in range(n+1)]
for i in range(n):
    b,c = map(int,input().split())
    l[c].add(b)

ans = 0
for i in range(1,n+1):
    if len(l[i]) <= 1:
        continue
    ans += len(l[i])-1
print(ans)
0