5543 | 2023-07-18 22:53:57 | Andros | Xorzótábla | cpp17 | Time limit exceeded 14/100 | 2.099s | 5644 KiB |
#include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional> //functionalban van a bitwise xor
#define maxN 100001
using namespace std;
int a[maxN];
int b[maxN];
int bases[maxN];
int main()
{
int n, m;
cin >> n >> m;
for (int i = 0; i < n; i++)
{
cin >> a[i];
}
for (int i = 0; i < m; i++)
{
cin >> b[i];
}
//Roll unwrapping?
vector<int> col(m);
int temp_a;
vector<int> sor(n);
for (int i = 0; i < n; i++)
{
temp_a = a[i];
for (int j = 0; j < m; j++)
{
col[j] = temp_a + b[j];
}
sor[i]=accumulate(col.begin(), col.end(), 0, bit_xor<void>());
}
int sol = accumulate(sor.begin(), sor.end(), 0, bit_xor<void>());
cout << sol;
}
Subtask | Sum | Test | Verdict | Time | Memory | ||
---|---|---|---|---|---|---|---|
subtask1 | 0/0 | ||||||
1 | Accepted | 3ms | 1824 KiB | ||||
2 | Time limit exceeded | 2.04s | 2628 KiB | ||||
subtask2 | 14/14 | ||||||
3 | Accepted | 2ms | 2216 KiB | ||||
4 | Accepted | 3ms | 2340 KiB | ||||
5 | Accepted | 3ms | 2420 KiB | ||||
6 | Accepted | 3ms | 2636 KiB | ||||
7 | Accepted | 4ms | 2644 KiB | ||||
8 | Accepted | 4ms | 2864 KiB | ||||
9 | Accepted | 4ms | 3204 KiB | ||||
subtask3 | 0/14 | ||||||
10 | Accepted | 2ms | 3176 KiB | ||||
11 | Time limit exceeded | 2.069s | 4164 KiB | ||||
12 | Time limit exceeded | 2.061s | 4176 KiB | ||||
13 | Time limit exceeded | 2.069s | 4288 KiB | ||||
14 | Time limit exceeded | 2.056s | 4272 KiB | ||||
subtask4 | 0/14 | ||||||
15 | Time limit exceeded | 2.042s | 4144 KiB | ||||
16 | Time limit exceeded | 2.065s | 4412 KiB | ||||
17 | Time limit exceeded | 2.052s | 4444 KiB | ||||
18 | Time limit exceeded | 2.013s | 4736 KiB | ||||
19 | Time limit exceeded | 2.069s | 4764 KiB | ||||
subtask5 | 0/21 | ||||||
20 | Accepted | 635ms | 4448 KiB | ||||
21 | Time limit exceeded | 2.073s | 4144 KiB | ||||
22 | Time limit exceeded | 2.045s | 4412 KiB | ||||
23 | Time limit exceeded | 2.046s | 4708 KiB | ||||
24 | Time limit exceeded | 2.053s | 4784 KiB | ||||
25 | Time limit exceeded | 2.099s | 5072 KiB | ||||
subtask6 | 0/37 | ||||||
26 | Accepted | 164ms | 4536 KiB | ||||
27 | Time limit exceeded | 2.046s | 4408 KiB | ||||
28 | Time limit exceeded | 2.065s | 4520 KiB | ||||
29 | Time limit exceeded | 2.058s | 4584 KiB | ||||
30 | Time limit exceeded | 2.036s | 4980 KiB | ||||
31 | Time limit exceeded | 2.081s | 5228 KiB | ||||
32 | Time limit exceeded | 2.065s | 5172 KiB | ||||
33 | Time limit exceeded | 2.045s | 5308 KiB | ||||
34 | Time limit exceeded | 2.053s | 5644 KiB |