Codeforces Round #258 (Div. 2/A)/Codeforces451A_Game With Sticks
解题报告
http://blog.csdn.net/juncoder/article/details/38102263
n和m跟木棍相交,问一人取一交点(必须是交点。且取完后去掉交点的两根木棍),最后谁赢
思路:
取最大正方形,以对角线上的交点个数推断输赢。
#include <iostream> #include <cstdio> using namespace std; int main() { int m,n; while(cin>>n>>m) { if(n>m) { if(m%2==0) printf("Malvika\n"); else { printf("Akshat\n"); } } else { if(n%2==0) printf("Malvika\n"); else { printf("Akshat\n"); } } } return 0; }