# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
713750 | LittleOrange | Mechanical Doll (IOI18_doll) | C++17 | 84 ms | 9268 KiB |
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>
using namespace std;
using ll = int;
void create_circuit(int M, std::vector<int> A) {
int N = A.size();
std::vector<int> C(M + 1);
C[0] = A[0];
for (int i = 1; i <= M; ++i) C[i]=0;
if (N == 1){
for (int i = 1; i <= M; ++i) C[i] = 0;
vector<int> X,Y;
answer(C, X, Y);
return;
}
vector<ll> ctr(M);
ll mxctr = 0;
for(ll i : A) ctr[i-1]++;
for(ll i : ctr) mxctr = max(mxctr,i);
if (mxctr == 1){
vector<int> X,Y;
A.push_back(0);
for(ll i = 0;i<N;i++) C[A[i]] = A[i+1];
answer(C, X, Y);
return;
}else if (mxctr == 2){
ll it = 0;
vector<ll> ptr(M);
for(ll i = 0;i<M;i++){
Compilation message (stderr)
# | 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... |