結果

問題 No.1390 Get together
ユーザー marroncastle
提出日時 2021-02-13 01:44:04
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 213 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 82,376 KB
実行使用メモリ 115,284 KB
最終ジャッジ日時 2024-07-20 03:07:03
合計ジャッジ時間 7,735 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15 WA * 14
権限があれば一括ダウンロードができます

ソースコード

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