結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー Mottchan
提出日時 2023-03-27 22:25:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 81,976 KB
実行使用メモリ 93,776 KB
最終ジャッジ日時 2024-09-19 16:58:35
合計ジャッジ時間 3,795 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 18 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
S = [[]for i in range(n)]
for i in range(n-1):
    u,v = list(map(int, input().split()))
    S[u-1].append(v)
    S[v-1].append(u)

cnt=list()
for i in S:
    cnt.append(len(i))

cnt.sort()

if cnt[0] == 0:
    if cnt[1] <= 1:
        print('Alice')
    else:
        print('Bob')
else:
    print('Bob')
0