# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1158060 | MrDogMeat | Mechanical Doll (IOI18_doll) | C++20 | 12 ms | 2372 KiB |
#include<bits/stdc++.h>
using namespace std;
const int MAXM = 1e5 + 5;
void answer(std::vector<int> C, std::vector<int> X, std::vector<int> Y);
bool checked[MAXM];
void create_circuit(int M, std::vector<int> A) {
vector<int> AnsC, AnsX, AnsY;
AnsC.resize(M + 1);
AnsC[0] = A[0];
for(int iA = 0; iA < A.size() - 1; iA++) {
int cur_trigger = A[iA];
int next_trigger = A[iA + 1];
AnsC[cur_trigger] = next_trigger;
checked[cur_trigger] = true;
}
for(int trigger = 1; trigger <= M; trigger++) {
if(!checked[trigger]) {
AnsC[trigger] = 0;
}
}
answer(AnsC, AnsX, AnsY);
};
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |