結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー Mottchan
提出日時 2023-03-27 22:47:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 312 bytes
コンパイル時間 639 ms
コンパイル使用メモリ 82,120 KB
実行使用メモリ 93,448 KB
最終ジャッジ日時 2024-09-19 17:13:54
合計ジャッジ時間 3,837 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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].append(v)
    S[v].append(u)

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

cnt.sort()
if cnt[0]==0:
    if cnt[1] >= 2:
        print('Bob')
    else:
       print('Alice')
else:
    print('Bob')
0