Submission #836050

# Submission time Handle Problem Language Result Execution time Memory
836050 2023-08-24T06:32:21 Z Trumling Digital Circuit (IOI22_circuit) C++17
0 / 100
1834 ms 1360 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>r;
    ll n;
    void init(int N, int M, std::vector<int> P, vector<int> A) 
    {
    n=M;
    for(int i=0;i<M;i++)
    r.pb(A[i]);

     
    }
     
    int count_ways(int L, int R) 
    {
      ll count=0;
      for(int i=0;i<n;i++)
      {
        if(i<L || i>R)
        count+=r[i];
        else
        {
          r[i]=1-r[i];
          count+=r[i];
        }
      }
     
      return count;
    }
# 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 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 1834 ms 1360 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 1834 ms 1360 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 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 0 ms 208 KB 2nd lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -