結果
| 問題 | 
                            No.3029 オイラー標数
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2025-04-03 10:13:23 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 360 ms / 2,000 ms | 
| コード長 | 229 bytes | 
| コンパイル時間 | 484 ms | 
| コンパイル使用メモリ | 82,776 KB | 
| 実行使用メモリ | 141,272 KB | 
| 最終ジャッジ日時 | 2025-04-03 10:13:35 | 
| 合計ジャッジ時間 | 10,831 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 27 | 
ソースコード
q=int(input())
V,E,F=set(),set(),set()
for _ in range(q):
    a,b,c=map(int,input().split())
    V.add(a)
    V.add(b)
    V.add(c)
    E.add((a,b))
    E.add((b,c))
    E.add((a,c))
    F.add((a,b,c))
print(len(V)-len(E)+len(F))