結果

問題 No.977 アリス仕掛けの摩天楼
ユーザー 双六双六
提出日時 2020-08-30 03:24:08
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 466 bytes
コンパイル時間 346 ms
コンパイル使用メモリ 86,952 KB
実行使用メモリ 78,400 KB
最終ジャッジ日時 2023-08-09 10:43:37
合計ジャッジ時間 4,273 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
71,764 KB
testcase_01 AC 87 ms
71,552 KB
testcase_02 AC 88 ms
71,512 KB
testcase_03 AC 90 ms
71,772 KB
testcase_04 AC 89 ms
71,516 KB
testcase_05 AC 89 ms
71,536 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 88 ms
71,816 KB
testcase_09 WA -
testcase_10 AC 91 ms
71,660 KB
testcase_11 AC 91 ms
71,796 KB
testcase_12 AC 90 ms
71,744 KB
testcase_13 AC 106 ms
77,436 KB
testcase_14 AC 102 ms
77,552 KB
testcase_15 AC 104 ms
77,368 KB
testcase_16 AC 105 ms
77,308 KB
testcase_17 AC 103 ms
77,488 KB
testcase_18 AC 108 ms
77,628 KB
testcase_19 AC 107 ms
77,688 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 129 ms
77,936 KB
testcase_25 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	N = int(input())
	L = [0] * N
	for i in range(N - 1):
		a, b = getlist()
		L[a] += 1; L[b] += 1

	cnt = 0
	for i in L:
		if i <= 1:
			cnt += 1

	if cnt >= 3:
		print("Alice")
	else:
		print("Bob")

if __name__ == '__main__':
	main()
0