結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー ssssskkkkkssssskkkkk
提出日時 2017-11-28 15:23:09
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 854 bytes
コンパイル時間 749 ms
コンパイル使用メモリ 77,200 KB
実行使用メモリ 9,984 KB
最終ジャッジ日時 2024-11-27 13:02:35
合計ジャッジ時間 39,366 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
9,856 KB
testcase_01 AC 1 ms
9,984 KB
testcase_02 AC 4 ms
5,248 KB
testcase_03 AC 2 ms
5,248 KB
testcase_04 AC 2 ms
5,248 KB
testcase_05 AC 5 ms
5,248 KB
testcase_06 AC 2 ms
5,248 KB
testcase_07 TLE -
testcase_08 AC 4,621 ms
5,248 KB
testcase_09 AC 3,710 ms
5,248 KB
testcase_10 AC 4,644 ms
5,248 KB
testcase_11 TLE -
testcase_12 AC 10 ms
5,248 KB
testcase_13 AC 2 ms
5,248 KB
testcase_14 AC 2 ms
5,248 KB
testcase_15 TLE -
testcase_16 AC 2 ms
5,248 KB
testcase_17 AC 1,154 ms
5,248 KB
testcase_18 TLE -
testcase_19 AC 615 ms
9,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdlib.h>
#include <iostream>
#include <vector>
#include <set>
#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;
typedef set<int> si;
typedef vector<bool> vb;
typedef vector<vector<bool>> vvb;
/* Coding Space */
int max_num;
int N;
int A[5001];
set<int> dp;
int main(void) {
	fastcin;
	scan(N);
	SREP(n, 1, N) scan(A[n]);
	dp.insert(0);
	SREP(n, 1, N) {
		for (auto d : dp) {
			dp.insert(d ^ A[n]);
		}
	}
	print(dp.size());
	return 0;
}
0