답안 #836070

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
836070 2023-08-24T06:55:37 Z ALeonidou 디지털 회로 (IOI22_circuit) C++17
2 / 100
1326 ms 1244 KB
#include "circuit.h"
#include <bits/stdc++.h>

using namespace std;
#define ll int
#define sz(x) (ll)x.size()
#define F first
#define S second
#define MID ((l+r)/2)
#define pb push_back
#define dbg(x) cout<<#x<<": "<<x<<endl;
#define dbg2(x,y) cout<<#x<<": "<<x<<" "<<#y<<": "<<y<<endl;
typedef vector <ll> vi;
typedef pair <ll,ll> ii;
typedef vector <ii> vii;

void printVct(vi &v, string s =""){
    cout<<s<<": ";
    for (ll i=0; i<sz(v); i++){
        cout<<v[i]<<" ";
    }
    cout<<endl;
}

ll n,m;
vi v;
void init(int N, int M, vi P, vi A) {
    n = N, m = M;
    v = A;
    return ;
}

int count_ways(int L, int R) {
    L -= n, R -= n;
    // dbg2(L,R);
    for (ll i=L; i<=R; i++){
        v[i] = !v[i];
    }

    // printVct(v);
    
    ll c = 0;
    for (ll i =0; i<m; i++){
        c += v[i];
    }
    return c;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Correct 0 ms 208 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 0 ms 208 KB Output is correct
5 Correct 1 ms 208 KB Output is correct
6 Correct 0 ms 208 KB Output is correct
7 Correct 1 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '52130940', found: '128'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Correct 0 ms 208 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 0 ms 208 KB Output is correct
5 Correct 1 ms 208 KB Output is correct
6 Correct 0 ms 208 KB Output is correct
7 Correct 1 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 208 KB Output is correct
10 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '52130940', found: '128'
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1326 ms 1244 KB 1st lines differ - on the 1st token, expected: '431985922', found: '16402'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1326 ms 1244 KB 1st lines differ - on the 1st token, expected: '431985922', found: '16402'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 208 KB Output is correct
2 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '52130940', found: '128'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Correct 0 ms 208 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 0 ms 208 KB Output is correct
5 Correct 1 ms 208 KB Output is correct
6 Correct 0 ms 208 KB Output is correct
7 Correct 1 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 208 KB Output is correct
10 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '52130940', found: '128'
11 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 208 KB Output is correct
2 Correct 0 ms 208 KB Output is correct
3 Correct 1 ms 208 KB Output is correct
4 Correct 0 ms 208 KB Output is correct
5 Correct 1 ms 208 KB Output is correct
6 Correct 0 ms 208 KB Output is correct
7 Correct 1 ms 208 KB Output is correct
8 Correct 1 ms 208 KB Output is correct
9 Correct 1 ms 208 KB Output is correct
10 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '52130940', found: '128'
11 Halted 0 ms 0 KB -