結果
問題 |
No.977 アリス仕掛けの摩天楼
|
ユーザー |
![]() |
提出日時 | 2020-01-31 21:33:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 451 bytes |
コンパイル時間 | 114 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,648 KB |
最終ジャッジ日時 | 2024-09-17 07:17:48 |
合計ジャッジ時間 | 2,729 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 14 |
ソースコード
# coding: utf-8 # Your code here! import sys sys.setrecursionlimit(10**6) readline = sys.stdin.readline read = sys.stdin.read n = int(input()) res = [0]*n for _ in range(n-2): a,b = [int(i) for i in readline().split()] res[a] += 1 res[b] += 1 c = res.count(0) d = res.count(1) if c >= 2: print("Alice") elif c == 0: print("Bob") else: if d == 0: print("Alice") else: print("Bob")