hdu 2188 悼念512汶川大地震遇难同胞——选拔志愿者 (巴什博奕)
题目链接:hdu 2188题目链接
题意&思路:巴什博奕。。画n点p点。。。
/*************************************************************************
> File Name: code/hdu/2188.cpp
> Author: 111qqz
> Email: rkz2013@126.com
> Created Time: 2015年09月22日 星期二 20时08分08秒
************************************************************************/
1#include<iostream>
2#include<iomanip>
3#include<cstdio>
4#include<algorithm>
5#include<cmath>
6#include<cstring>
7#include<string>
8#include<map>
9#include<set>
10#include<queue>
11#include<vector>
12#include<stack>
13#include<cctype>
14#define y1 hust111qqz
15#define yn hez111qqz
16#define j1 cute111qqz
17#define ms(a,x) memset(a,x,sizeof(a))
18#define lr dying111qqz
19using namespace std;
20#define For(i, n) for (int i=0;i<int(n);++i)
21typedef long long LL;
22typedef double DB;
23const int inf = 0x3f3f3f3f;
24void solve()
25{
26 int n,m;
27 scanf("%d %d",&n,&m);
28 if (n%(m+1)!=0)
29 {
30 puts("Grass");
31 }
32 else
33 {
34 puts("Rabbit");
35 }
36}
37int main()
38{
39 #ifndef ONLINE_JUDGE
40 freopen("in.txt","r",stdin);
41 #endif
42 int T;
43 cin>>T;
44 while (T--)
45 {
46 solve();
47 }
48 #ifndef ONLINE_JUDGE
49 fclose(stdin);
50 #endif
51 return 0;
52}