#include<iostream>
#include<stdio.h>
using namespace std;
#define MAX 12000
char map[MAX];
int main()
{
//freopen("in.txt","r",stdin);
int c;scanf("%d",&c);
while(c--)
{
int n;int m;
scanf("%d%d",&n,&m);
int i=0;
for(i=0;i<MAX;i++)
{
map[i]='n';
}
while(n>=0)
{
n=n-m-1;
map[n]='p';
}
if(map[0]=='n')
{
cout<<"Grass"<<endl;
}
else
{
cout<<"Rabbit"<<endl;
}
}
return 0;
}
(精)hdoj 2188 (博弈论)
最新推荐文章于 2022-02-25 19:38:17 发布