結果
| 問題 |
No.977 アリス仕掛けの摩天楼
|
| ユーザー |
|
| 提出日時 | 2020-01-31 22:52:38 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 367 bytes |
| コンパイル時間 | 114 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,520 KB |
| 最終ジャッジ日時 | 2024-09-17 09:52:10 |
| 合計ジャッジ時間 | 4,120 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 WA * 3 RE * 7 |
ソースコード
N = int(input())
B = [0] * N
for i in range(N-1):
u, v = list(map(int, input().split()))
B[u] += 1
B[v] += 1
no_b = 0
for i, bi in enumerate(B):
if bi == 0:
no_b += 1
if no_b == 0:
print("Bob")
else:
for i in B:
if i not in [0, 2]:
ans = False
if ans:
print('Bob')
else:
print("Alice")