hdu3863 no gambling

题目地址

题解

由于后手只能不断采取行动去堵先手的路,而先手一定可以采取方式突破,所以先手必胜。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

#include <cstdlib>
#include <algorithm>
#include <cstring>
#include <cctype>
#define INF 2000000000
using namespace std;
typedef long long ll;
int (){
int f=1,x=0;char c=getchar();
while(c<'0'||c>'9'){if(c=='-')f=-f;c=getchar();}
while(c>='0'&&c<='9')x=x*10+c-'0',c=getchar();
return f*x;
}
void init(){

}
void solve(){
for(int n;;){
n=read();
if(n<0)break;
printf("I bet on Oregon Maple~n");
}
}
int main(){
init();
solve();
return 0;
}