# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
218311 | edsa | Mechanical Doll (IOI18_doll) | C++14 | 112 ms | 19680 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<bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
using vi = vector<int>;
using vll = vector<ll>;
using vii = vector<ii>;
const ll MOD = 998244353;
const int INF = 1e9+9;
const int MAXN = 200005;
#include "doll.h"
int sm[2*MAXN], add[2*MAXN], nxt[MAXN];
vi gr[MAXN];
vi C, X, Y;
void create_circuit(int M, vector<int> A) {
for (int i = 1; i < (int) A.size(); ++i) {
gr[A[i-1]].push_back(A[i]);
}
gr[A.back()].push_back(0);
C.resize(M+1);
C[0] = A[0];
for (int i = 1; i <= M; ++i) {
if (gr[i].empty()) {
C[i] = 0;
continue;
}
# | 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... |