結果
| 問題 |
No.2278 Time Bomb Game 2
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-01-26 00:28:23 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 406 bytes |
| コンパイル時間 | 937 ms |
| コンパイル使用メモリ | 64,000 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2025-01-26 00:28:27 |
| 合計ジャッジ時間 | 2,980 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 69 WA * 1 |
ソースコード
#include<iostream>
#include<algorithm>
#include<cassert>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N,K,T;
cin>>N>>K>>T;
string C;cin>>C;
K--;
bool win=false;
for(int t=0;t<2;t++)
{
int l=K;
while(l>=0&&C[K]==C[l])l--;
if(l>=0&&(K-l)%2==T%2&&K-l<=T)win=true;
reverse(C.begin(),C.end());
K=N-1-K;
}
cout<<(win^C[K]=='A'?"Bob":"Alice")<<endl;
}