結果

問題 No.3845 eval("G4M3")
コンテスト
ユーザー S
提出日時 2026-12-03 05:22:30
結果
WA  
実行時間 -
コード長 790 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,729 ms
コンパイル使用メモリ 353,372 KB
実行使用メモリ 9,928 KB
最終ジャッジ日時 2026-12-03 05:22:36
合計ジャッジ時間 5,749 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge6_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 29 WA * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include "bits/stdc++.h"

using namespace std;
#define int int64_t
#define cat cerr
#ifndef MEOW
#define cerr if (0) cerr
#endif

void setup(){

}
void solve(){
    int n;
    cin>>n;
    string s;
    cin>>s;
    int pp = 0;
    for (int i=0;i+1<n;i++){
        if ((s[i]-'0')%2||(s[i+1]-'0')%2){
            pp++;
        }
    }
    if (n%2==1){
        if (pp%2==1){
            cout<<"Alice\n";
            return;
        }
    }
    if (pp&&(n%2==0)){
        cout<<"Alice\n";
    }
    else{
        cout<<"Bob\n";
    }

}

signed main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    int t=1;

    cin>>t;

    setup();
    while (t--){
        solve();
    }
}

//What would Chika do?
//What would Chika do?
//What would Chika do?
//What would Chika do?
//What would Chika do?
0