結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー Fpga18Gansn1230Fpga18Gansn1230
提出日時 2017-10-05 17:26:34
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 460 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 54,516 KB
実行使用メモリ 183,552 KB
最終ジャッジ日時 2024-04-28 07:39:51
合計ジャッジ時間 2,440 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 WA -
testcase_08 AC 184 ms
163,456 KB
testcase_09 AC 126 ms
112,896 KB
testcase_10 AC 148 ms
135,424 KB
testcase_11 AC 192 ms
177,152 KB
testcase_12 WA -
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 113 ms
23,424 KB
testcase_15 AC 200 ms
183,552 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 46 ms
43,136 KB
testcase_18 WA -
testcase_19 AC 23 ms
22,912 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;

short int map[5001][0b1000000000000000]={0};

int main(){
  int H;
  int A[5000];
  cin >> H;
  for(int i=0;i<H;i++){
    cin >> A[i];
  }
  map[0][0]=1;
  int count=0;
  for(int i=0;i<H;i++){
    for(int j=0;j<16385;j++){
      if(map[i][j]==1){
        map[i+1][j]=1;
        map[i+1][j^A[i]]=1;
      }
    }
  }
  int counter=0;
  for(int i=0;i<16385;i++){
    counter+=map[H][i];
  }
  cout << counter <<endl;
}
0