Submission #1066765

#TimeUsernameProblemLanguageResultExecution timeMemory
1066765pccBeech Tree (IOI23_beechtree)C++17
0 / 100
1 ms348 KiB
#include "beechtree.h" #include <bits/stdc++.h> using namespace std; std::vector<int> beechtree(int N, int M, std::vector<int> P, std::vector<int> C){ vector<int> ans(N,0); ans[N-1] = 1; for(int i = N-2;i>=0;i--){ if(ans[i+1]&&C[i] == C[i+1])ans[i] = 1; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...