Submission #62084231
Source Code Expand
Copy
#include <iostream>#include <set>#include <vector>using namespace std;typedef long long sll;typedef struct row {sll counts[12];sll cxor() {sll ans = 0;for (int i = 0; i < 12; i++) {ans ^= counts[i];}return ans;}} row;sll A[12];
#include <iostream> #include <set> #include <vector> using namespace std; typedef long long sll; typedef struct row { sll counts[12]; sll cxor() { sll ans = 0; for (int i = 0; i < 12; i++) { ans ^= counts[i]; } return ans; } } row; sll A[12]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int N; cin >> N; for (int i = 0; i < N; i++) { cin >> A[i]; } vector<row> vec; vec.push_back({}); int s = 0, e = 1; for (int i = 0; i < N; i++) { for (int r = s; r < e; r++) { for (int j = 0; j <= i; j++) { row rw = vec[r]; rw.counts[j] += A[i]; vec.push_back(rw); } } s = e; e = vec.size(); } set<sll> st; for (int i = s; i < e; i++) { st.insert(vec[i].cxor()); } cout << st.size() << '\n'; return 0; }
Submission Info
Submission Time | |
---|---|
Task | D - Stone XOR |
User | riverlike14 |
Language | C++ 20 (gcc 12.2) |
Score | 0 |
Code Size | 894 Byte |
Status | RE |
Exec Time | 3168 ms |
Memory | 3153892 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example_00.txt, example_01.txt, example_02.txt |
All | example_00.txt, example_01.txt, example_02.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt, random_20.txt, random_21.txt, random_22.txt, random_23.txt, random_24.txt, random_25.txt, random_26.txt, random_27.txt, random_28.txt, random_29.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
example_00.txt | AC | 1 ms | 3604 KB |
example_01.txt | AC | 1 ms | 3476 KB |
example_02.txt | AC | 1 ms | 3516 KB |
hand_00.txt | RE | 3074 ms | 3153892 KB |
hand_01.txt | RE | 3089 ms | 3152544 KB |
hand_02.txt | RE | 3168 ms | 3152484 KB |
hand_03.txt | RE | 3128 ms | 3152492 KB |
hand_04.txt | AC | 2 ms | 3560 KB |
hand_05.txt | RE | 3074 ms | 3152476 KB |
random_00.txt | AC | 550 ms | 396448 KB |
random_01.txt | AC | 1 ms | 3452 KB |
random_02.txt | AC | 1 ms | 3520 KB |
random_03.txt | AC | 7 ms | 9412 KB |
random_04.txt | RE | 3091 ms | 3152552 KB |
random_05.txt | RE | 3149 ms | 3152608 KB |
random_06.txt | AC | 471 ms | 396448 KB |
random_07.txt | AC | 1 ms | 3488 KB |
random_08.txt | RE | 3049 ms | 3152500 KB |
random_09.txt | AC | 460 ms | 396644 KB |
random_10.txt | RE | 3100 ms | 3152480 KB |
random_11.txt | AC | 474 ms | 396472 KB |
random_12.txt | AC | 446 ms | 396484 KB |
random_13.txt | RE | 3084 ms | 3152516 KB |
random_14.txt | RE | 3149 ms | 3152520 KB |
random_15.txt | RE | 3073 ms | 3152436 KB |
random_16.txt | RE | 3072 ms | 3152508 KB |
random_17.txt | AC | 559 ms | 396548 KB |
random_18.txt | AC | 557 ms | 396536 KB |
random_19.txt | AC | 1 ms | 3500 KB |
random_20.txt | AC | 1 ms | 3544 KB |
random_21.txt | RE | 3151 ms | 3152456 KB |
random_22.txt | AC | 523 ms | 396436 KB |
random_23.txt | AC | 1 ms | 3440 KB |
random_24.txt | RE | 3101 ms | 3152552 KB |
random_25.txt | AC | 434 ms | 396604 KB |
random_26.txt | AC | 2 ms | 4056 KB |
random_27.txt | RE | 3082 ms | 3152504 KB |
random_28.txt | AC | 460 ms | 396464 KB |
random_29.txt | RE | 3074 ms | 3152536 KB |