답안 #938975

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
938975 2024-03-06T02:18:13 Z irmuun 디지털 회로 (IOI22_circuit) C++17
0 / 100
371 ms 6504 KB
#include<bits/stdc++.h>
#include "circuit.h"

using namespace std;

#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
#define rall(s) s.rbegin(),s.rend()

const int mod=1000002022;

const int maxn=2e5;
vector<int>adj[maxn];
vector<int>a;
int n,m;

void init(int N,int M,vector<int>p,vector<int>A){
    n=N;
    m=M;
    a=A;
    for(int i=1;i<n;i++){
        adj[p[i]].pb(i);
    }
}

int count_ways(int l,int r){
    if(n==1){
        int cnt=0;
        for(int i=1;i<n+m;i++){
            if(l<=i&&i<=r){
                a[i]=1-a[i];
            }
            cnt+=a[i];
        }
        return cnt;
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4952 KB Output is correct
2 Correct 1 ms 4952 KB Output is correct
3 Incorrect 1 ms 4952 KB 4th lines differ - on the 1st token, expected: '500', found: '504'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4952 KB Output is correct
2 Incorrect 2 ms 4952 KB 1st lines differ - on the 1st token, expected: '52130940', found: '0'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4952 KB Output is correct
2 Correct 1 ms 4952 KB Output is correct
3 Incorrect 1 ms 4952 KB 4th lines differ - on the 1st token, expected: '500', found: '504'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 371 ms 6504 KB 1st lines differ - on the 1st token, expected: '431985922', found: '0'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 371 ms 6504 KB 1st lines differ - on the 1st token, expected: '431985922', found: '0'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4952 KB Output is correct
2 Incorrect 2 ms 4952 KB 1st lines differ - on the 1st token, expected: '52130940', found: '0'
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4952 KB Output is correct
2 Correct 1 ms 4952 KB Output is correct
3 Incorrect 1 ms 4952 KB 4th lines differ - on the 1st token, expected: '500', found: '504'
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 4952 KB Output is correct
2 Correct 1 ms 4952 KB Output is correct
3 Incorrect 1 ms 4952 KB 4th lines differ - on the 1st token, expected: '500', found: '504'
4 Halted 0 ms 0 KB -