Submission #797567

# Submission time Handle Problem Language Result Execution time Memory
797567 2023-07-29T16:35:12 Z jakobrs Digital Circuit (IOI22_circuit) C++17
0 / 100
2045 ms 1444 KB
#include <iostream>
#include <vector>

using i64 = int64_t;

int n, m;
std::vector<int> p, a;

void init(int N, int M, std::vector<int> P, std::vector<int> A) {
    n = N;
    m = M;
    p = P;
    a = A;
}

int count_ways(int l, int r) {
    r += 1;

    int c = 0;
    for (i64 i = 0; i < m; i++) {
        if (l <= i && i < r) {
            a[i] = !a[i];
        }
        c += a[i];
    }

    return c;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB 2nd lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB 2nd lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB 2nd lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2045 ms 1444 KB 1st lines differ - on the 1st token, expected: '431985922', found: '16401'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2045 ms 1444 KB 1st lines differ - on the 1st token, expected: '431985922', found: '16401'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB 2nd lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB 2nd lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB 2nd lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -