結果
| 問題 | 
                            No.1390 Get together
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Subaru314
                         | 
                    
| 提出日時 | 2021-02-12 23:18:27 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 402 bytes | 
| コンパイル時間 | 102 ms | 
| コンパイル使用メモリ | 12,288 KB | 
| 実行使用メモリ | 109,884 KB | 
| 最終ジャッジ日時 | 2024-07-20 00:55:35 | 
| 合計ジャッジ時間 | 7,214 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 WA * 3 TLE * 1 -- * 15 | 
ソースコード
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)
            
            
            
        
            
Subaru314