結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー rlangevin
提出日時 2023-01-03 14:41:38
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 190 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 76,416 KB
最終ジャッジ日時 2024-11-27 01:52:33
合計ジャッジ時間 2,350 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline = sys.stdin.readline
    
N = int(readline())
D = [0] * N
for i in range(N - 1):
    w, v = map(int, readline().split())
    D[w] += 1
    D[v] += 1
    
zero = 0
for i in range(N):
    if D[i] == 0:
        zero += 1
if (zero == 1 and len(set(D)) == 2) or not zero:
    print("Bob")
else:
    print("Alice")
0