hdu 3863 No Gambling

题意:给你一个大小为n的图,点的分布如上图所示,然后先手要建立一条路使从最左边连接到最右边,后手要建立一条路从最上边连接到最下边,问谁能赢.

思路:画一下会发现,是先手必胜的,如果我们考虑后手一直都在堵先手的路,因为先手会比后手多走一步,所以说先手到达最右边是没法堵的,因为游戏已经结束了.

#include<stdio.h>
using namespace std;


int main(){
	int n;
	while(scanf("%d",&n)!=EOF){
		if(n==-1)
		break;
		printf("I bet on Oregon Maple~\n");
	}
	return 0;
}

猜你喜欢

转载自blog.csdn.net/l2533636371/article/details/80166661
hdu