Please sign in first.
Official
N - Chocolate Game Editorial
by
N - Chocolate Game Editorial
by
keisuke6
WIP
想定解 (c++)
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
int Q;
cin>>Q;
while(Q--){
int h,w,k;
cin>>h>>w>>k;
if((h-1)*w < k && h*(w-1) < k) cout<<"Bob"<<endl;
else if(h == 1 || w == 1) cout<<"Alice"<<endl;
else if(k != 1 && ((h-1)*((k-1)/w+1) < k || ((w-1)*((k-1)/h+1) < k))) cout<<"Alice"<<endl;
else if(h == w) cout<<"Bob"<<endl;
else cout<<"Alice"<<endl;
}
}
posted:
last update:
