結果

問題 No.183 たのしい排他的論理和(EASY)
ユーザー springroll
提出日時 2018-11-18 00:06:42
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 308 bytes
コンパイル時間 1,487 ms
コンパイル使用メモリ 172,240 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-24 14:42:47
合計ジャッジ時間 2,226 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 2 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;


int main() {
	int N;
	cin >> N;
	vector<int> A(N);
	int X=0;
	set<int> s;
	for (int i = 0; i < N; i++) {
		cin >> A[i];
		X = X^A[i];
		//cout << (0^A[i]) << endl;
		//cout << X << endl;
		s.insert(0^A[i]);
		s.insert(X^A[i]);
	}

	cout << s.size() << endl;

}
0