結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー MottchanMottchan
提出日時 2023-03-27 22:47:06
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 312 bytes
コンパイル時間 665 ms
コンパイル使用メモリ 81,684 KB
実行使用メモリ 93,280 KB
最終ジャッジ日時 2023-10-19 21:09:57
合計ジャッジ時間 4,679 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,640 KB
testcase_01 AC 41 ms
51,648 KB
testcase_02 AC 41 ms
51,652 KB
testcase_03 AC 43 ms
51,672 KB
testcase_04 AC 42 ms
51,668 KB
testcase_05 AC 42 ms
51,700 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 44 ms
52,124 KB
testcase_09 AC 43 ms
52,124 KB
testcase_10 AC 43 ms
52,124 KB
testcase_11 AC 43 ms
52,140 KB
testcase_12 AC 43 ms
52,144 KB
testcase_13 WA -
testcase_14 AC 91 ms
76,596 KB
testcase_15 AC 105 ms
76,596 KB
testcase_16 WA -
testcase_17 AC 106 ms
76,828 KB
testcase_18 WA -
testcase_19 AC 134 ms
80,208 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 264 ms
92,780 KB
testcase_24 AC 230 ms
93,280 KB
testcase_25 AC 262 ms
92,788 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].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