Submission #1078163

# Submission time Handle Problem Language Result Execution time Memory
1078163 2024-08-27T13:27:27 Z MohamedFaresNebili Beech Tree (IOI23_beechtree) C++17
0 / 100
1 ms 348 KB
#include <bits/stdc++.h>
#include "beechtree.h"

        using namespace std;

        vector<int> beechtree(int N, int M, vector<int> _P, vector<int> C) {
            vector<int> ans(N, 0);
            vector<int> P(N, 0);
            for(int l = 2; l < N; l++) P[l] = P[l - 1] + (C[l] == C[l - 1]);
            for(int l = 0; l < N; l++) {
                if(P[N - 1] - P[l] == N - l - 1)
                    ans[l] = 1;
            }
            return ans;
        }




# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 2nd lines differ - on the 2nd token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 2nd lines differ - on the 1st token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 2nd lines differ - on the 1st token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 2nd lines differ - on the 2nd token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 2nd lines differ - on the 1st token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 2nd lines differ - on the 2nd token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 2nd lines differ - on the 1st token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 2nd lines differ - on the 2nd token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 2nd lines differ - on the 1st token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 2nd lines differ - on the 2nd token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -