`
阿尔萨斯
  • 浏览: 4168922 次
社区版块
存档分类
最新评论

Codeforces 451A Game With Sticks(水题)

 
阅读更多

题目链接:Codeforces 451A Game With Sticks

题目大意:给出n,m,表示有n根水平的木棍,m根竖直的木棍,每次选取一个交点,取掉相应的两根木棍,直到不存在交点位置。

解题思路:水题,直接判断min(n,m)为奇数还是偶数。

#include <cstdio>
#include <cstring>
#include <algorithm>

using namespace std;
int main () {
    int n, m;
    scanf("%d%d", &n, &m);
    int x = min(n, m);
    printf("%s\n", x&1? "Akshat" : "Malvika");
    return 0;
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics