Submission #624303

# Submission time Handle Problem Language Result Execution time Memory
624303 2022-08-07T18:11:06 Z Dan4Life Mechanical Doll (IOI18_doll) C++17
6 / 100
83 ms 14264 KB
#include "doll.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define sz(a) (int)a.size()
void create_circuit(int M, vector<int> A) {
    A.insert(A.begin(),0); A.push_back(0);
    int n = A.size(), ind=-1;
    vector<int> C(M+1,0),X,Y,v[M+1];
    for(int i = 0; i < n-1; i++) v[A[i]].pb(A[i+1]);
    for(int i = 0; i < n-1; i++){
        if(v[A[i]].size()==2)
            C[A[i]]=ind, X.pb(v[A[i]][0]), Y.pb(v[A[i]][1]), ind--;
        else C[A[i]]=A[i+1];
    }
    answer(C,X,Y);
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 23 ms 6556 KB Output is correct
3 Correct 19 ms 5436 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 9 ms 3756 KB Output is correct
6 Correct 30 ms 8164 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 23 ms 6556 KB Output is correct
3 Correct 19 ms 5436 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 9 ms 3756 KB Output is correct
6 Correct 30 ms 8164 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 65 ms 10668 KB Output is correct
9 Correct 52 ms 11036 KB Output is correct
10 Correct 83 ms 14264 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 220 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 23 ms 6556 KB Output is correct
3 Correct 19 ms 5436 KB Output is correct
4 Correct 0 ms 212 KB Output is correct
5 Correct 9 ms 3756 KB Output is correct
6 Correct 30 ms 8164 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 65 ms 10668 KB Output is correct
9 Correct 52 ms 11036 KB Output is correct
10 Correct 83 ms 14264 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 220 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Incorrect 45 ms 6524 KB wrong motion
15 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB wrong motion
2 Halted 0 ms 0 KB -