結果
| 問題 |
No.977 アリス仕掛けの摩天楼
|
| ユーザー |
|
| 提出日時 | 2020-02-01 04:02:04 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 442 bytes |
| コンパイル時間 | 283 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 24,832 KB |
| 最終ジャッジ日時 | 2024-09-18 19:27:52 |
| 合計ジャッジ時間 | 3,128 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 18 WA * 8 |
ソースコード
from sys import stdin
def main():
input = lambda: stdin.readline()[:-1]
global N, graph, vis
N = int(input())
UV = [tuple(map(int, input().split())) for _ in [0] * (N - 1)]
cnt = [0] * N
for u, v in UV:
cnt[u] += 1
cnt[v] += 1
zero = cnt.count(0)
if not zero:
print('Bob')
elif zero == 1 and cnt.count(2) == N - 1:
print('Bob')
else:
print('Alice')
main()