Submission #823180

# Submission time Handle Problem Language Result Execution time Memory
823180 2023-08-12T08:53:21 Z ALeonidou Mechanical Doll (IOI18_doll) C++17
2 / 100
16 ms 2260 KB
#include "doll.h"
#include <bits/stdc++.h>

using namespace std;

#define MOD 1000000007
#define INF 1e18
#define ll int
typedef vector <int> vi;
typedef pair <int,int> ii;
#define dbg(x) cout<<#x<<": "<<x<<endl;
#define sz(x) (ll)x.size()
#define pb push_back

void printVct(vi &v){
    for (ll i= 0; i<sz(v); i++){
        cout<<v[i]<<" ";
    }
    cout<<endl;
}

void create_circuit(int m, vi v) {
    int n = sz(v);
    vi c(m+1,0), x, y;
    ll a,b;
    c[0] = v[0];
    for(ll i=0; i<n; i++){
        a = v[i];
        if (i<n-1) b = v[i+1]; else b = 0;
        c[a] = b;
    }
    //printVct(c);
    answer(c,x,y);
}

/*
4 4
1 2 3 4

6 4
2 4 3 1

1 1
1

6 6 
6 5 1 2 4 3

*/
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 13 ms 1876 KB Output is correct
3 Correct 10 ms 1492 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 7 ms 1364 KB Output is correct
6 Correct 16 ms 2260 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 13 ms 1876 KB Output is correct
3 Correct 10 ms 1492 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 7 ms 1364 KB Output is correct
6 Correct 16 ms 2260 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Incorrect 16 ms 2004 KB wrong motion
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 13 ms 1876 KB Output is correct
3 Correct 10 ms 1492 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 7 ms 1364 KB Output is correct
6 Correct 16 ms 2260 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Incorrect 16 ms 2004 KB wrong motion
9 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 0 ms 212 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB wrong motion
2 Halted 0 ms 0 KB -