zoukankan      html  css  js  c++  java
  • HDU 5011 NIM博弈

    http://www.cnblogs.com/exponent/articles/2141477.html

    http://acm.hust.edu.cn/vjudge/contest/122814#problem/E

    #include <iostream>
    #include <string>
    #include <cstring>
    #include <cstdlib>
    #include <cstdio>
    #include <cmath>
    #include <algorithm>
    #include <stack>
    #include <queue>
    #include <cctype>
    #include <vector>
    #include <iterator>
    #include <set>
    #include <map>
    #include <sstream>
    using namespace std;
    
    #define mem(a,b) memset(a,b,sizeof(a))
    #define pf printf
    #define sf scanf
    #define spf sprintf
    #define pb push_back
    #define debug printf("!
    ")
    #define MAXN 205
    #define MAX(a,b) a>b?a:b
    #define blank pf("
    ")
    #define LL long long
    #define ALL(x) x.begin(),x.end()
    #define INS(x) inserter(x,x.begin())
    #define pqueue priority_queue
    #define INF 0x3f3f3f3f
    
    int n,m;
    
    int main()
    {
        int i,j;
        while(~sf("%d",&n) && n)
        {
            int cnt = 0;
            for(i=0;i<n;i++)
            {
                sf("%d",&m);
                cnt^=m;
            }
            if(cnt) pf("Win
    ");
            else pf("Lose
    ");
    
        }
        return 0;
    }
  • 相关阅读:
    数据类型
    一些骚操作
    re
    多任务
    监听按钮点击事件
    监听按钮点击事件
    监听按钮点击事件
    将博客搬至博客园
    将博客搬至博客园
    将博客搬至博客园
  • 原文地址:https://www.cnblogs.com/qlky/p/5685555.html
Copyright © 2011-2022 走看看