Submission #914769

# Submission time Handle Problem Language Result Execution time Memory
914769 2024-01-22T16:15:24 Z Namkhing Digital Circuit (IOI22_circuit) C++17
Compilation error
0 ms 0 KB
#include "circuit"
#include <bits/stdc++.h>
using namespace std;

int n, m;
vector<int> val;

void init(int N, int M, std::vector<int> P, std::vector<int> A) {
    n = N, m = M;
    for (int i = 0; i < M; i++) {
        val.push_back(A[i]);
    }
}

int count_ways(int L, int R) {
    int l = L - n, r = R - n, total = 0;

    for (int i = l; i <= r; i++) {
        val[i] ^= 1;
    }

    for (int i = 0; i < m; i++) {
        total += val[i];
    }

    return total;
}

Compilation message

circuit.cpp:1:10: fatal error: circuit: No such file or directory
    1 | #include "circuit"
      |          ^~~~~~~~~
compilation terminated.