結果
| 問題 |
No.2103 ±1s Game
|
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2022-10-21 21:33:45 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 560 bytes |
| コンパイル時間 | 3,907 ms |
| コンパイル使用メモリ | 251,160 KB |
| 最終ジャッジ日時 | 2025-02-08 09:52:12 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 WA * 10 |
ソースコード
#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000001
#define Inf64 3000000000000000
int main(){
int X,Y,K,P;
cin>>X>>Y>>K>>P;
int turns = X+Y-K;
int need = 0;
if(Y%2==1)need = 1;
if(P==-1)need ^= 1;
int E;
if(need==0){
E = min(turns-1,Y);
}
else{
E = min(turns,Y);
}
//cout<<E<<','<<need<<endl;
if(E%2==need)cout<<"Alice"<<endl;
else cout<<"Bob"<<endl;
return 0;
}
沙耶花