結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー roiti46roiti46
提出日時 2015-04-21 00:30:40
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 393 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 50,940 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-18 02:05:29
合計ジャッジ時間 3,442 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 270 ms
4,380 KB
testcase_08 AC 249 ms
4,380 KB
testcase_09 AC 170 ms
4,380 KB
testcase_10 AC 204 ms
4,380 KB
testcase_11 AC 270 ms
4,376 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 246 ms
4,376 KB
testcase_15 AC 284 ms
4,376 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 63 ms
4,376 KB
testcase_18 AC 257 ms
4,380 KB
testcase_19 AC 31 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int dp[1 << 16];

int main(void){
    int N, a;
    cin >> N;
    for (int i = 0; i < N; i++) {
        cin >> a;
        for (int j = 0; j < (1 << 16); j++) {
            if (dp[j]) dp[j ^ a] = 1;
        }
        dp[a] = 1;
    }

    int ans = 0;
    for (int i = 0; i < (1 << 16); i++) ans += dp[i];
    cout << ans << endl;
    
    return 0;
}
0