Submission #15097

# Submission time Handle Problem Language Result Execution time Memory
15097 2015-07-11T10:13:21 Z fleo0917 씽크스몰 (kriii3_TT) C++14
10 / 30
10000 ms 16708 KB
#include <stdio.h>

int n, m, l;
int i, j;
unsigned int ret;
unsigned int a[1000000], b[1000000], c[2000000];
int main(int argc, char *argv[])
{
    scanf("%d", &n);
    scanf("%d", &m);
    l = n + m + 1;
    for (i = 0; i <= n; ++i)
        scanf("%u", a+i);
    for (i = 0; i <= m; ++i)
        scanf("%u", b+i);
    for (i = 0; i <= l; ++i) {
        c[i] = 0;
        for (j = 0; j <= i; ++j) {
            c[i] += a[j] * b[i-j];
        }
    }
    ret = c[0];
    for (i = 1; i < l; ++i) {
        ret ^= c[i];
    }
    printf("%u\n", ret);
    return 0;
}
# 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 4 ms 16708 KB Output is correct
6 Correct 3 ms 16708 KB Output is correct
7 Correct 4 ms 16708 KB Output is correct
8 Correct 4 ms 16708 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 429 ms 16708 KB Output is correct
2 Correct 7137 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 -