hdu1846

一道小水博弈,推一下就出来了

#include <iostream>
#include <cstdio>
using namespace std;

int N, n, m;

int main() {
	scanf("%d", &N);
	while(N--)
	{
		scanf("%d%d", &n, &m);
		if(n%(m+1) == 0) printf("second\n");
		else printf("first\n");
	}
	return 0;
}

posted @ 2011-05-18 23:52  KOKO's  阅读(81)  评论(0编辑  收藏  举报