結果
| 問題 |
No.3112 Decrement or Mod Game
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-20 10:33:21 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 989 bytes |
| コンパイル時間 | 2,004 ms |
| コンパイル使用メモリ | 194,092 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-04-20 10:33:26 |
| 合計ジャッジ時間 | 4,104 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 55 WA * 10 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/dsu>
using namespace std;
#define rep(i,a) for(int i=0;i<a;i++)
#define f(i,a,b) for(int i=a;i<=b;i++)
#define rf(i,a,b) for(int i=a;i>=b;i--)
using ll = long long;
using ld = long double;
using vi= vector<int>;
using vvi= vector<vi>;
using vs= vector<string>;
using pii= pair<int, int>;
using vpii= vector<pii>;
#define endl '\n'
int main(void){
cin.tie(nullptr);
ios::sync_with_stdio(false);
bool Alice_turn = true;
ll a, b;
cin >> a >> b;
if(a<b){
a--;
while (a != 0) {
if (b / a >= 2){
cout << "Bob" << endl;
return 0;
}
long long temp = b % a;
b = a;
a = temp;
}
cout << "Alice" << endl;
return 0;
}else {
while (b != 0) {
if (a / b >= 2){
cout<< "Alice"<<endl;
return 0;
}
long long temp = a % b;
a = b;
b = temp;
}
cout << "Bob" <<endl;
}
}