結果
| 問題 |
No.2278 Time Bomb Game 2
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2023-04-24 02:05:23 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 638 bytes |
| コンパイル時間 | 397 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,264 KB |
| 最終ジャッジ日時 | 2024-11-08 07:05:04 |
| 合計ジャッジ時間 | 6,102 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 69 WA * 1 |
ソースコード
import sys
input = sys.stdin.readline
N,K,T=map(int,input().split())
C=input().strip()
K-=1
left=-1
for i in range(K,-1,-1):
if C[K]!=C[i]:
left=i
break
right=-1
for i in range(K,N):
if C[K]!=C[i]:
right=i
break
if left!=-1:
if K-left<=T and (K-left)%2==T%2:
if C[K]=="A":
print("Alice")
else:
print("Bob")
exit()
if right!=-1:
if right-K<=T and (right-K)%2==T%2:
if C[K]=="A":
print("Alice")
else:
print("Bob")
exit()
if C[K]!="A":
print("Alice")
else:
print("Bob")
titia