結果

問題 No.2814 Block Game
ユーザー pockyny
提出日時 2025-07-19 06:26:39
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 612 bytes
コンパイル時間 984 ms
コンパイル使用メモリ 68,744 KB
実行使用メモリ 7,720 KB
最終ジャッジ日時 2025-07-19 06:26:53
合計ジャッジ時間 13,554 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;
typedef long long ll;
int main(){
    int t; cin >> t;
    while(t){
        t--;
        ll n; string s; cin >> n >> s;
        ll x = n;
        while(!(x&1)){
            x /= 2;
        }
        if(x==1){
            if(n==2){
                if(s=="Odd") cout << "Alice\n";
                else cout << "Bob\n";
            }else{
                if(s=="Odd") cout << "Bob\n";
                else cout << "Alice\n";
            }
        }else if(n&1){
            cout << "Alice\n";
        }else{
            cout << "Bob\n";
        }
    }
}
0