55442023-07-18 22:56:10AndrosXorzótáblacpp17Time limit exceeded 14/1002.099s5612 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];
	}

	int temp = 0;
	//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];
		}
		temp = accumulate(col.begin(), col.end(), temp, bit_xor<void>());
	}
	cout << temp;
}
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Accepted3ms1820 KiB
2Time limit exceeded2.099s2552 KiB
subtask214/14
3Accepted3ms2244 KiB
4Accepted3ms2460 KiB
5Accepted3ms2592 KiB
6Accepted3ms2676 KiB
7Accepted4ms2684 KiB
8Accepted4ms2680 KiB
9Accepted4ms2888 KiB
subtask30/14
10Accepted2ms2960 KiB
11Time limit exceeded2.069s3956 KiB
12Time limit exceeded2.052s3904 KiB
13Time limit exceeded2.082s4108 KiB
14Time limit exceeded2.073s4036 KiB
subtask40/14
15Time limit exceeded2.049s3968 KiB
16Time limit exceeded2.065s4260 KiB
17Time limit exceeded2.016s4284 KiB
18Time limit exceeded2.072s4760 KiB
19Time limit exceeded2.042s4656 KiB
subtask50/21
20Accepted635ms4536 KiB
21Time limit exceeded2.073s4172 KiB
22Time limit exceeded2.061s4676 KiB
23Time limit exceeded2.072s5156 KiB
24Time limit exceeded2.061s5248 KiB
25Time limit exceeded2.04s5132 KiB
subtask60/37
26Accepted164ms4632 KiB
27Time limit exceeded2.081s4556 KiB
28Time limit exceeded2.032s4800 KiB
29Time limit exceeded2.072s4888 KiB
30Time limit exceeded2.02s5384 KiB
31Time limit exceeded2.045s5468 KiB
32Time limit exceeded2.062s5612 KiB
33Time limit exceeded2.056s5508 KiB
34Time limit exceeded2.058s5556 KiB