View Code of Problem 3932

#include<bits/stdc++.h>
#define f for(int i=1;i<4;++i)
using namespace std;
int main(){
	int t;while(cin>>t){
	while(t--){
		int n[4],x[4],k=0,ans;
		f cin>>n[i];
		f cin>>x[i];
		f
		if(n[i]%(x[i]+1)==0)//先手输
			k==1?k=1,ans=0:k=0,ans=1;
		else //先手赢
			k==1?k=0,ans=1:k=1,ans=0;
		if(!ans)cout<<"Bob"<<endl;
		else cout<<"Alice"<<endl;
	}	
	}
	
}
	

Double click to view unformatted code.


Back to problem 3932