Submission #1058911

# Submission time Handle Problem Language Result Execution time Memory
1058911 2024-08-14T14:59:47 Z Joshua_Andersson Mechanical Doll (IOI18_doll) C++14
2 / 100
11 ms 3160 KB
#include "doll.h"

#include <bits/stdc++.h>
using namespace std;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> p2;

#define rep(i, high) for (int i = 0; i < high; i++)
#define repp(i, low, high) for (int i = low; i < high; i++)
#define repe(i, container) for (auto& i : container)
#define sz(container) ((int)container.size())
#define all(x) begin(x),end(x)

#if _LOCAL
#define assert(x) if (!(x)) __debugbreak()
#endif


void create_circuit(int m, std::vector<int> a)
{
	int n = sz(a);
	vi c(m + 1);
	c[0] = a[0];
	rep(i, n-1)
	{
		c[a[i]] = a[i + 1];
	}
	c[a.back()] = 0;
	std::vector<int> X, Y;
	answer(c, X, Y);
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 9 ms 2352 KB Output is correct
3 Correct 7 ms 2140 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 10 ms 1372 KB Output is correct
6 Correct 11 ms 2908 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 9 ms 2352 KB Output is correct
3 Correct 7 ms 2140 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 10 ms 1372 KB Output is correct
6 Correct 11 ms 2908 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Incorrect 11 ms 3160 KB wrong motion
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 9 ms 2352 KB Output is correct
3 Correct 7 ms 2140 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 10 ms 1372 KB Output is correct
6 Correct 11 ms 2908 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Incorrect 11 ms 3160 KB wrong motion
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB wrong motion
2 Halted 0 ms 0 KB -