# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
740435 | 2023-05-12T13:13:38 Z | danikoynov | Mechanical Doll (IOI18_doll) | C++14 | 31 ms | 10012 KB |
#include "doll.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 2e5 + 10; int n, m; vector < int > g[maxn]; void create_circuit(int M, vector<int> A) { n = A.size(); m = M; vector < int > c(m + 1); g[0].push_back(A[0]); for (int i = 1; i < A.size(); i ++) { g[A[i - 1]].push_back(A[i]); } g[A.back()].push_back(0); vector < int > x, y; for (int i = 0; i <= m; i ++) { if (g[i].size() == 0) c[i] = 0; else if (g[i].size() == 1) c[i] = g[i][0]; } answer(c, x, y); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4948 KB | Output is correct |
2 | Correct | 24 ms | 8720 KB | Output is correct |
3 | Correct | 18 ms | 8340 KB | Output is correct |
4 | Correct | 2 ms | 4948 KB | Output is correct |
5 | Correct | 11 ms | 6100 KB | Output is correct |
6 | Correct | 31 ms | 10012 KB | Output is correct |
7 | Correct | 3 ms | 4948 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4948 KB | Output is correct |
2 | Correct | 24 ms | 8720 KB | Output is correct |
3 | Correct | 18 ms | 8340 KB | Output is correct |
4 | Correct | 2 ms | 4948 KB | Output is correct |
5 | Correct | 11 ms | 6100 KB | Output is correct |
6 | Correct | 31 ms | 10012 KB | Output is correct |
7 | Correct | 3 ms | 4948 KB | Output is correct |
8 | Incorrect | 30 ms | 8788 KB | wrong motion |
9 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 4948 KB | Output is correct |
2 | Correct | 24 ms | 8720 KB | Output is correct |
3 | Correct | 18 ms | 8340 KB | Output is correct |
4 | Correct | 2 ms | 4948 KB | Output is correct |
5 | Correct | 11 ms | 6100 KB | Output is correct |
6 | Correct | 31 ms | 10012 KB | Output is correct |
7 | Correct | 3 ms | 4948 KB | Output is correct |
8 | Incorrect | 30 ms | 8788 KB | wrong motion |
9 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 4948 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 4948 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 3 ms | 4948 KB | wrong motion |
2 | Halted | 0 ms | 0 KB | - |