結果
| 問題 |
No.2103 ±1s Game
|
| コンテスト | |
| ユーザー |
Haa
|
| 提出日時 | 2022-10-21 22:23:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 991 bytes |
| コンパイル時間 | 1,567 ms |
| コンパイル使用メモリ | 166,580 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-01 06:56:29 |
| 合計ジャッジ時間 | 2,680 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 WA * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) v.begin(),v.end()
template<typename T> bool chmax(T &x, const T &y) {return (x<y)?(x=y,true):false;};
template<typename T> bool chmin(T &x, const T &y) {return (x>y)?(x=y,true):false;};
constexpr ll MOD=998244353;
constexpr ll INF=2e18;
int main(){
ll x, y, k, p;
cin >> x >> y >> k >> p;
ll l=x+y-k;
if(l/2<min(x,y)){
if(l%2==0)
cout << "Bob" << endl;
else
cout << "Alice" << endl;
}
else{
if(y<x){
if((p==1)==(y%2==0))
cout << "Alice" << endl;
else
cout << "Bob" << endl;
}
else{
if(k%2==((p==1)^(y%2==0)))
cout << "Alice" << endl;
else
cout << "Bob" << endl;
}
}
return 0;
}
Haa