# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
836047 | 2023-08-24T06:29:35 Z | Trumling | Digital Circuit (IOI22_circuit) | C++17 | 9 ms | 1736 KB |
#include "circuit.h" #include<bits/stdc++.h> using namespace std; #define F first #define S second #define all(x) x.begin(),x.end() typedef long long ll; #define pb push_back #define INF 9999999999999999 vector<ll>pre; ll n; void init(int N, int M, std::vector<int> P, std::vector<int> A) { n=N; pre.assign(M,0); for(int i=0;i<M;i++) pre[i]==((i==0)?0:pre[i-1])+A[i]; } int count_ways(int L, int R) { ll curr=pre[n-1]-pre[R] + ((L==0)?0:pre[L-1]); curr+=(R-L+1)-(pre[R]-((L==0)?0:pre[L-1])); return curr; }
Compilation message
# | 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 | 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 | 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 | Runtime error | 9 ms | 1736 KB | Execution killed with signal 11 |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Runtime error | 9 ms | 1736 KB | Execution killed with signal 11 |
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 | 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 | 0 ms | 208 KB | 2nd lines differ - on the 1st token, expected: '2', found: '1' |
2 | Halted | 0 ms | 0 KB | - |