結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー c-yan
提出日時 2020-02-02 20:44:31
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 271 bytes
コンパイル時間 86 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-09-18 21:24:25
合計ジャッジ時間 3,429 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

edges = [0] * N
for _ in range(N - 1):
    u, v = map(int, input().split())
    edges[u] += 1
    edges[v] += 1

t = sum(1 for e in edges if e == 0)
if sum(1 for e in edges if e == 1) !=0:
    t += 1

if t >= 2:
    print('Alice')
else:
    print('Bob')
0