#include#include#include#include#include#include

欧美三区_成人在线免费观看视频_欧美极品少妇xxxxⅹ免费视频_a级毛片免费播放_鲁一鲁中文字幕久久_亚洲一级特黄

S-Nim

系統(tǒng) 2136 0

http://acm.hdu.edu.cn/showproblem.php?pid=1536

SG經(jīng)典題,不多說(shuō)

?

    // File Name: hdu1536.cpp

// Author: bo_jwolf

// Created Time: 2013年09月30日 星期一 18:23:53



#include<vector>

#include<list>

#include<map>

#include<set>

#include<deque>

#include<stack>

#include<bitset>

#include<algorithm>

#include<functional>

#include<numeric>

#include<utility>

#include<sstream>

#include<iostream>

#include<iomanip>

#include<cstdio>

#include<cmath>

#include<cstdlib>

#include<cstring>

#include<ctime>



using namespace std;



const int N = 105 ;

const int MAXN = 10100;

bool vis[MAXN];

int sg[MAXN];

int si[ MAXN ] , n ;

int Getsg( int N )

{//printf( " n = %dn",n );

    int hash[105] = {0};

    for( int i = 0; i < n && si[i] <= N; ++i )

    {

         if( sg[N-si[i]] == -1 )

             sg[N-si[i]] = Getsg( N - si[i] );

         hash[sg[N-si[i]]] = 1;

     }

     for( int i = 0; ; i++ )

          if( !hash[i] )

              return i;

}



int main(){

    int temp , ans , m  ; 

    while( scanf( "%d" , &n ) != EOF && n ){

        for( int i = 0 ; i < n ; ++i ){

            scanf( "%d" , &si[ i ] ) ;

        }

        memset( sg , -1 , sizeof( sg ) ) ;

        sort( si , si + n ) ;

        int Case ;

        scanf( "%d" , &Case ) ;

        while( Case-- ){

            scanf( "%d" , &m ) ;

            ans = 0;

            for( int i = 0 ; i < m ; ++i ){

                scanf( "%d" , &temp ) ;

                ans ^= Getsg( temp ) ;

            }

            if( ans ==  0 ) cout << "L"  ;

            else cout << "W"  ;

        }

        cout << endl ;

    }

return 0;

}
  


?

?

S-Nim


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號(hào)聯(lián)系: 360901061

您的支持是博主寫(xiě)作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長(zhǎng)非常感激您!手機(jī)微信長(zhǎng)按不能支付解決辦法:請(qǐng)將微信支付二維碼保存到相冊(cè),切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對(duì)您有幫助就好】

您的支持是博主寫(xiě)作最大的動(dòng)力,如果您喜歡我的文章,感覺(jué)我的文章對(duì)您有幫助,請(qǐng)用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長(zhǎng)會(huì)非常 感謝您的哦!??!

發(fā)表我的評(píng)論
最新評(píng)論 總共0條評(píng)論
主站蜘蛛池模板: 精品国产乱码久久久久久久 | 亚洲综合一区二区三区 | 91免费大全 | 东方亚洲东方欧美色二区 | 欧美在线激情 | 亚洲一区二区三区视频 | 久久99国产精品成人欧美 | 欧美成在人线a免费视频 | 午夜精品电影 | 2019中文字幕视频 | 曰韩在线视频 | 在线播放三级 | 天天色天天 | 欧美一极视频 | 韩国一级免费视频 | 久久亚洲欧美日韩精品专区 | 99久久99九九99九九九 | 亚洲精品国产电影 | 午夜影视在线观看 | 久久伦理中文字幕 | 亚洲国产欧美在线人成aaa | 成人免费a视频 | 久久成人精品视频 | 99热视| 青草青草久热精品视频在线网站 | 亚洲免费看片 | 污的视频在线观看 | 欧美精品在线一区二区三区 | 国产精品视频26uuu | 午夜免费视频 | a毛片成人免费全部播放 | 亚洲精品福利 | 114美女做爰视频在线 | 午夜性啪啪A片免费AAA毛片 | 亚洲天堂视频在线免费观看 | 老子午夜影院 | 在线欧美日韩 | av一级毛片 | 亚洲国产精品二区久久 | JLZZJLZZ日本人护士水好多 | 在线二区人妖系列 |