Submission #1095850

# Submission time Handle Problem Language Result Execution time Memory
1095850 2024-10-03T10:29:28 Z owoovo Mechanical Doll (IOI18_doll) C++17
2 / 100
28 ms 12636 KB
#include "doll.h"
#include<bits/stdc++.h>
#define F first 
#define S second 
using namespace std;
int m,n,c[800010],x[800010],y[800010],now;
vector<int> e[200010];
vector<int> a;
void create_circuit(int M, std::vector<int> A) {
	now=0;
	n=A.size();
	m=M;
	a=A;
	for(int i=0;i<n-1;i++){
		e[a[i]].push_back(a[i+1]);
	}
	c[0]=a[0];
	for(int i=1;i<=m;i++){
		int ne=e[i].size();
		if(ne==0)continue;
		if(ne==1){
			c[i]=e[i][0];
			continue;
		}
		if(ne==2){
			now--;
			c[i]=now;
			x[-now]=e[i][0];
			y[-now]=e[i][1];
			continue;
		}
		if(ne==3){

		}
		if(ne==4){
			
		}
	}
	vector<int> C,X,Y;
	C.resize(M+1);
	X.resize(-now);
	Y.resize(-now);
	for(int i=0;i<=m;i++)C[i]=c[i];
	for(int i=0;i<-now;i++){
		X[i]=x[i+1];
		y[i]=y[i+1];
	}
	answer(C,X,Y);
	return;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 4956 KB Output is correct
2 Correct 16 ms 9968 KB Output is correct
3 Correct 18 ms 9308 KB Output is correct
4 Correct 3 ms 4956 KB Output is correct
5 Correct 7 ms 6236 KB Output is correct
6 Correct 22 ms 11596 KB Output is correct
7 Correct 2 ms 4952 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 4956 KB Output is correct
2 Correct 16 ms 9968 KB Output is correct
3 Correct 18 ms 9308 KB Output is correct
4 Correct 3 ms 4956 KB Output is correct
5 Correct 7 ms 6236 KB Output is correct
6 Correct 22 ms 11596 KB Output is correct
7 Correct 2 ms 4952 KB Output is correct
8 Incorrect 28 ms 12636 KB wrong motion
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 4956 KB Output is correct
2 Correct 16 ms 9968 KB Output is correct
3 Correct 18 ms 9308 KB Output is correct
4 Correct 3 ms 4956 KB Output is correct
5 Correct 7 ms 6236 KB Output is correct
6 Correct 22 ms 11596 KB Output is correct
7 Correct 2 ms 4952 KB Output is correct
8 Incorrect 28 ms 12636 KB wrong motion
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 4952 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 5140 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 5140 KB wrong motion
2 Halted 0 ms 0 KB -