結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー MottchanMottchan
提出日時 2023-03-27 22:25:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 320 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 81,844 KB
実行使用メモリ 93,320 KB
最終ジャッジ日時 2023-10-19 20:52:31
合計ジャッジ時間 3,637 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,472 KB
testcase_01 AC 37 ms
53,472 KB
testcase_02 AC 38 ms
53,472 KB
testcase_03 AC 38 ms
53,472 KB
testcase_04 AC 38 ms
53,472 KB
testcase_05 AC 38 ms
53,472 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 39 ms
53,472 KB
testcase_09 AC 39 ms
53,472 KB
testcase_10 AC 38 ms
53,472 KB
testcase_11 AC 39 ms
53,472 KB
testcase_12 AC 39 ms
53,472 KB
testcase_13 WA -
testcase_14 AC 92 ms
76,648 KB
testcase_15 AC 91 ms
76,648 KB
testcase_16 WA -
testcase_17 AC 91 ms
76,868 KB
testcase_18 WA -
testcase_19 AC 117 ms
80,264 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 236 ms
92,828 KB
testcase_24 AC 222 ms
93,320 KB
testcase_25 AC 232 ms
92,832 KB
権限があれば一括ダウンロードができます

ソースコード

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