結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー tottoripapertottoripaper
提出日時 2015-04-16 23:26:44
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 506 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 25,960 KB
実行使用メモリ 83,024 KB
最終ジャッジ日時 2023-09-17 21:04:38
合計ジャッジ時間 1,752 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,384 KB
testcase_07 WA -
testcase_08 AC 89 ms
74,584 KB
testcase_09 AC 62 ms
52,116 KB
testcase_10 AC 74 ms
62,316 KB
testcase_11 AC 98 ms
80,724 KB
testcase_12 WA -
testcase_13 AC 1 ms
4,376 KB
testcase_14 AC 82 ms
81,252 KB
testcase_15 AC 100 ms
83,024 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 24 ms
21,420 KB
testcase_18 WA -
testcase_19 AC 13 ms
13,240 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// Wrongri-La Shower

#include <cstdio>

bool can[5001][(1<<14)+1];

int main(){
    int N;
    scanf("%d", &N);

    int A[5000];
    for(int i=0;i<N;i++){
        scanf("%d", A+i);
    }

    can[0][0] = true;
    for(int i=0;i<N;i++){
        for(int j=0;j<=1<<14;j++){
            if(!can[i][j]){continue;}

            can[i+1][j] = true;
            can[i+1][j^A[i]] = true;
        }
    }

    int res = 0;
    for(int i=0;i<=1<<14;i++){
        res += can[N][i];
    }

    printf("%d\n", res);
}
0