Submission #101912

# Submission time Handle Problem Language Result Execution time Memory
101912 2019-03-21T02:49:11 Z iris2617 Mechanical Doll (IOI18_doll) C++14
Compilation error
0 ms 0 KB
#include<iostream>
#include<doll.h>
using namespace std;
void create_circuit(int M,int[] A)
{
	int i,b;
	int c[10],x[10],y[10];
	for(i=0,b=0;i<M;i++)
	{
		c[b]=A[i];
		b=A[i];
	}
	c[b]=0;
	answer(c,x,y);
}

Compilation message

doll.cpp:4:33: error: expected ',' or '...' before 'A'
    4 | void create_circuit(int M,int[] A)
      |                                 ^
doll.cpp: In function 'void create_circuit(int, int*)':
doll.cpp:10:8: error: 'A' was not declared in this scope
   10 |   c[b]=A[i];
      |        ^
doll.cpp:14:9: error: could not convert '(int*)(& c)' from 'int*' to 'std::vector<int>'
   14 |  answer(c,x,y);
      |         ^
      |         |
      |         int*