結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー c-yanc-yan
提出日時 2020-02-02 20:44:31
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 271 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 11,840 KB
実行使用メモリ 10,812 KB
最終ジャッジ日時 2023-10-19 01:26:10
合計ジャッジ時間 3,680 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,160 KB
testcase_01 AC 29 ms
10,160 KB
testcase_02 AC 30 ms
10,160 KB
testcase_03 AC 31 ms
10,160 KB
testcase_04 AC 30 ms
10,160 KB
testcase_05 AC 30 ms
10,160 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 31 ms
10,160 KB
testcase_09 AC 31 ms
10,160 KB
testcase_10 AC 30 ms
10,160 KB
testcase_11 AC 29 ms
10,160 KB
testcase_12 AC 30 ms
10,160 KB
testcase_13 WA -
testcase_14 AC 58 ms
10,252 KB
testcase_15 AC 59 ms
10,252 KB
testcase_16 WA -
testcase_17 AC 58 ms
10,252 KB
testcase_18 WA -
testcase_19 AC 118 ms
10,280 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 319 ms
10,808 KB
testcase_24 AC 310 ms
10,808 KB
testcase_25 AC 318 ms
10,808 KB
権限があれば一括ダウンロードができます

ソースコード

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