結果
問題 |
No.183 たのしい排他的論理和(EASY)
|
ユーザー |
![]() |
提出日時 | 2025-03-16 00:36:14 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 544 bytes |
コンパイル時間 | 3,150 ms |
コンパイル使用メモリ | 280,012 KB |
実行使用メモリ | 7,324 KB |
最終ジャッジ日時 | 2025-03-16 00:36:32 |
合計ジャッジ時間 | 16,873 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 10 WA * 8 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { cin.tie(nullptr)->sync_with_stdio(false); int n; cin >> n; vector<int> a(n); rep(i, n) cin >> a[i]; set<int> ans; vector<int> sum(n + 1); rep(i, n) sum[i + 1] = sum[i] ^ a[i]; rep(l, n + 1) rep(r, n + 1) ans.insert(sum[r] ^ sum[l]); cout << ans.size() << '\n'; return 0; }