标签:
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 7370 Accepted Submission(s): 4899
#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<stdlib.h> #include<queue> #include<stack> #include<algorithm> #include<ctype.h> #define LL __int64 using namespace std; const int MAXN=50+5; const int INF=0x3f3f3f3f; const double EPS=1e-9; int dir4[][2]={{0,1},{1,0},{0,-1},{-1,0}}; int dir8[][2]={{0,1},{1,1},{1,0},{1,-1},{0,-1},{-1,-1},{-1,0},{-1,1}}; int dir_8[][2]={{-2,1},{-1,2},{1,2},{2,1},{2,-1},{1,-2},{-1,-2},{-2,-1}}; int main() { int kase; scanf("%d",&kase); while(kase--) { int n,m; scanf("%d %d",&n,&m); if(n%(m+1)!=0) printf("first\n"); else printf("second\n"); } return 0; }
标签:
原文地址:http://www.cnblogs.com/clliff/p/4256188.html