結果
| 問題 | No.1582 Vertexes vs Edges | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-01-10 22:24:57 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                RE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 390 bytes | 
| コンパイル時間 | 1,469 ms | 
| コンパイル使用メモリ | 82,244 KB | 
| 実行使用メモリ | 89,156 KB | 
| 最終ジャッジ日時 | 2024-11-14 11:10:42 | 
| 合計ジャッジ時間 | 6,944 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | RE * 3 | 
| other | RE * 36 | 
ソースコード
N = int(input())
G = [[] for _ in range(N+1)]
for _ in range(N-1):
    u,v = map(int,input().split())
    G[u].append(v)
    G[v].append(u)
    
even = 0
odd = 0
import sys
sys.setrecursionlimit(10 ** 8)
def dfs(now = 1,parent = 0,depth = 0):
    if depth % 2 == 0:even += 1
    else:odd += 1
    for v in G[now]:
        if v != parent:
            dfs(v,now,depth +1)
print(min(eve,odd))
            
            
            
        