結果
| 問題 | No.3845 eval("G4M3") |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-12-03 05:05:15 |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 731 bytes |
| 記録 | |
| コンパイル時間 | 2,486 ms |
| コンパイル使用メモリ | 355,680 KB |
| 実行使用メモリ | 9,928 KB |
| 最終ジャッジ日時 | 2026-12-03 05:05:22 |
| 合計ジャッジ時間 | 6,038 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 13 WA * 36 |
ソースコード
#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<n;i++){
if ((s[i]-'0')%2==1){
pp+=2;
if (i==0||i+1==n){
pp--;
}
}
}
if (pp%2){
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?