P:先手必输 N:先手必胜 PN图规则:如果一个点能转换到的所有点都是N,那么此点状态为P.若能转化到一个P,即使对手面临必输状态,此点为N. 然后找规律就行 #include<bits/stdc++.h> using namespace std; int main() { int n, m; while (scanf("%d%d", &n, &m) && n + m) { != && m % != ) { printf(…
kiki's game Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 40000/10000 K (Java/Others)Total Submission(s): 9663 Accepted Submission(s): 5817 Problem Description Recently kiki has nothing to do. While she is bored, an idea appears in his m…
Rabbit and Grass Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3609 Accepted Submission(s): 2726 Problem Description 大学时光是浪漫的,女生是浪漫的,圣诞更是浪漫的,但是Rabbit和Grass这两个大学女生在今年的圣诞节却表现得一点都不浪漫:不去逛商场,不去逛…
Brave Game Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10397 Accepted Submission(s): 7007 Problem Description 十年前读大学的时候,中国每年都要从国外引进一些电影大片,其中有一部电影就叫<勇敢者的游戏>(英文名称:Zathura),一直到现在,我依然对于电影中的部…
思路: 0 1 2 3 4 5 6 7 8 9 10 11 12 P N N P N N P N N P N N P 不难发现:当n为三的倍数时,KIKI处于P态 AC代码 #include <cstdio> #include <cmath> #include <algorithm> #include <cstring> #include <utility> #include <string&g…
Stone Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1136 Accepted Submission(s): 792 Problem Description Tang and Jiang are good friends. To decide whose treat it is for dinner, they are p…
kiki's game HDU - 2147 题意:一个n*m的表格,起始位置为右上角,目标位置为左下角,甲先开始走,走的规则是可以向左,向下或者向左下(对顶的)走一格.谁先走到目标位置谁就胜利.在甲乙都采用最佳策略的时候,先走者能否获胜. 这是一个5*5的PN图 从中可以看出,只要满足行或列中的某一个为偶数就可以先手必胜 #include<iostream> #include<cstdio> using namespace std; int main(){ int n,m; ){…