Submission #15052

# Submission time Handle Problem Language Result Execution time Memory
15052 2015-07-11T07:34:18 Z hongjun7 씽크스몰 (kriii3_TT) C++
10 / 30
10000 ms 16708 KB
#include <cstdio>
#define MN 1000005
int n, m;
long long a[MN], b[MN];
int main() {
	scanf("%d%d", &n, &m);
	for (int i = 0; i <= n; i++) scanf("%lld", a + i);
	for (int i = 0; i <= m; i++) scanf("%lld", b + i);
	long long res = 0, x;
	for (int k = 0; k <= n + m; k++) {
		x = 0;
		for (int i = 0; i <= k; i++) if (i <= n && k-i <= m) x += a[i] * b[k - i];
		res ^= x;
	}
	printf("%lld", res);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 16708 KB Output is correct
2 Correct 0 ms 16708 KB Output is correct
3 Correct 0 ms 16708 KB Output is correct
4 Correct 0 ms 16708 KB Output is correct
5 Correct 0 ms 16708 KB Output is correct
6 Correct 3 ms 16708 KB Output is correct
7 Correct 3 ms 16708 KB Output is correct
8 Correct 3 ms 16708 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 405 ms 16708 KB Output is correct
2 Correct 5357 ms 16708 KB Output is correct
3 Execution timed out 10000 ms 16708 KB Program timed out
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Halted 0 ms 0 KB -