結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ssssskkkkkssssskkkkk
提出日時 2017-11-28 15:01:41
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 822 bytes
コンパイル時間 476 ms
コンパイル使用メモリ 69,468 KB
実行使用メモリ 83,328 KB
最終ジャッジ日時 2024-05-05 14:51:09
合計ジャッジ時間 2,398 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 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 1 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 WA -
testcase_08 AC 152 ms
74,496 KB
testcase_09 AC 99 ms
52,224 KB
testcase_10 AC 117 ms
62,080 KB
testcase_11 AC 157 ms
80,640 KB
testcase_12 WA -
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 113 ms
23,424 KB
testcase_15 AC 163 ms
83,328 KB
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 37 ms
21,120 KB
testcase_18 WA -
testcase_19 AC 18 ms
12,032 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#define rep(i,n)	for(int i=0;i<n;i++)
#define srep(i,a,n)	for(int i=a;i<n;i++)
#define REP(i,n)	for(int i=0;i<=n;i++)
#define SREP(i,a,n)	for(int i=a;i<=n;i++)
#define rrep(i,n)	for(int i=n-1;i>=0;i--)
#define RREP(i,n)	for(int i=n;i>=0;i--)
#define scan(x) cin >> x
#define print(x) cout << x << endl
#define fastcin {\
    cin.tie(0);\
    ios::sync_with_stdio(false);\
}
using namespace std;
typedef long long ll;
/* Coding Space */
int N;
int A[5001];
bool dp[5001][16385];
int main(void) {
	fastcin;
	scan(N);
	SREP(n, 1, N) scan(A[n]);
	dp[0][0] = true;
	SREP(n, 1, N) REP(a, 16384) {
		if (!dp[n - 1][a]) continue;
		dp[n][a] = true;
		dp[n][a ^ A[n]] = true;
	}
	print(count(dp[N], dp[N] + 16385, true));
	return 0;
}
0