Submission #821356

# Submission time Handle Problem Language Result Execution time Memory
821356 2023-08-11T09:30:30 Z Dan4Life Mechanical Doll (IOI18_doll) C++17
2 / 100
20 ms 3496 KB
#include "doll.h"
#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
#define pb push_back
#define sz(a) (int)a.size()
#define all(a) begin(a),end(a)

int n, m;
vi a;

void getAns(){
	vi C(m+1);
	for(int i = 0; i <= m; i++) C[i] = i;
	C[0] = a[0];
	for(int i = 0; i < n-1; i++) C[a[i]] = C[a[i+1]];
	C[a[n-1]] = 0;
	int S = 0;
	vi X(S), Y(S);
	for(int k = 0; k < S; ++k) {
		X[k] = Y[k] = 0;
	}
	answer(C, X, Y);
}

void create_circuit(int M, vi A) {
	n = sz(A); m = M; a = A;
	getAns();
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 19 ms 2684 KB Output is correct
3 Correct 11 ms 2232 KB Output is correct
4 Correct 1 ms 304 KB Output is correct
5 Correct 12 ms 1364 KB Output is correct
6 Correct 15 ms 3228 KB Output is correct
7 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 19 ms 2684 KB Output is correct
3 Correct 11 ms 2232 KB Output is correct
4 Correct 1 ms 304 KB Output is correct
5 Correct 12 ms 1364 KB Output is correct
6 Correct 15 ms 3228 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Incorrect 20 ms 3496 KB wrong motion
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 19 ms 2684 KB Output is correct
3 Correct 11 ms 2232 KB Output is correct
4 Correct 1 ms 304 KB Output is correct
5 Correct 12 ms 1364 KB Output is correct
6 Correct 15 ms 3228 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Incorrect 20 ms 3496 KB wrong motion
9 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 -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB wrong motion
2 Halted 0 ms 0 KB -