# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1242463 | bangan | Overtaking (IOI23_overtaking) | C++20 | 0 ms | 0 KiB |
#include "beechtree.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ALL(a) a.begin(), a.end()
vector<int> beechtree(int n, int m, vector<int> p, vector<int> c) {
int col = c[n-1];
vector<int> ans(n);
for (int i = n-1; 0<=i; i--) {
ans[i] = 1;
if (c[i] != col) break;
}
return ans;
}