結果

問題 No.1390 Get together
ユーザー Subaru314Subaru314
提出日時 2021-02-12 23:18:27
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 402 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,964 KB
実行使用メモリ 118,912 KB
最終ジャッジ日時 2023-09-27 06:42:52
合計ジャッジ時間 5,756 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
12,200 KB
testcase_01 AC 14 ms
7,760 KB
testcase_02 AC 14 ms
7,816 KB
testcase_03 AC 206 ms
10,336 KB
testcase_04 AC 129 ms
9,916 KB
testcase_05 WA -
testcase_06 AC 129 ms
9,920 KB
testcase_07 WA -
testcase_08 AC 129 ms
9,608 KB
testcase_09 AC 251 ms
10,604 KB
testcase_10 AC 15 ms
7,840 KB
testcase_11 AC 15 ms
7,800 KB
testcase_12 AC 15 ms
7,928 KB
testcase_13 WA -
testcase_14 AC 15 ms
7,856 KB
testcase_15 AC 15 ms
7,856 KB
testcase_16 TLE -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = list(map(int, input().split()))

xy = [map(int, input().split()) for _ in range(n[0])]
x, y = [list(i) for i in zip(*xy)]

l = []

for i in range(1,n[0]+1):
  m = y.count(i)
  if m != 0:
    L = []
    for j in range(m):
      d = y.index(i)
      X = x.pop(d)
      Y = y.pop(d)
      L.append(X)
      LL = set(L)
    ANS = len(LL)-1
    l.append(ANS)
  else:
    pass
  
ans = sum(l)

print(ans)
0