結果

問題 No.1390 Get together
ユーザー marroncastlemarroncastle
提出日時 2021-02-13 01:44:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 262 ms
コンパイル使用メモリ 87,144 KB
実行使用メモリ 117,432 KB
最終ジャッジ日時 2023-09-27 09:00:46
合計ジャッジ時間 8,420 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,304 KB
testcase_01 AC 68 ms
71,308 KB
testcase_02 AC 65 ms
71,296 KB
testcase_03 AC 93 ms
78,368 KB
testcase_04 AC 98 ms
78,200 KB
testcase_05 WA -
testcase_06 AC 94 ms
77,876 KB
testcase_07 WA -
testcase_08 AC 93 ms
78,072 KB
testcase_09 AC 95 ms
78,276 KB
testcase_10 AC 63 ms
71,584 KB
testcase_11 AC 61 ms
71,412 KB
testcase_12 AC 63 ms
71,568 KB
testcase_13 WA -
testcase_14 AC 64 ms
71,364 KB
testcase_15 AC 63 ms
71,376 KB
testcase_16 AC 212 ms
97,380 KB
testcase_17 AC 308 ms
114,448 KB
testcase_18 AC 208 ms
104,328 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 324 ms
117,284 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 330 ms
117,104 KB
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = map(int, input().split())
setlis = [set() for _ in range(N)]
for i in range(N):
  b,c = map(int, input().split())
  setlis[c-1].add(b)
ans = 0
for i in range(N):
  ans += max(0,len(setlis[i])-1)
print(ans)
0