This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "doll.h"
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pp pop_back
#define mp make_pair
#define bb back
#define ff first
#define ss second
using namespace std;
void create_circuit(int m, vector<int> a) {
int ball = 0;
vector<int> C(m + 1, 0);
vector<int> X, Y;
a.push_back(0);
for (int next : a) {
if (C[ball] == next) {
ball = next;
continue;
}
if (C[ball] == 0) {
C[ball] = next;
} else {
X.push_back(C[ball]);
Y.push_back(next);
C[ball] = -X.size();
}
ball = next;
}
answer(C, X, Y);
}
# | 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... |