#include "doll.h"
#include <vector>
#include <stdio.h>
using namespace std;
int con[1000005]={0};
int This[1000005]={0};
vector < int > C,X,Y,x,y;
void create_circuit(int M, vector < int > A)
{
X.push_back(0);
Y.push_back(0);
int N=A.size(),now=1,i;
C.push_back(A[0]);
for(i=1;i<=M;i++) C.push_back(i);
for(i=0;i<N;i++) con[A[i]]++;
A.push_back(0);
for(i=0;i<M;i++)
{
if(con[A[i]]==1) C[A[i]]=A[i+1];
/*else if(con[A[i]])
{
if(This[A[i]]==0)
{
C[A[i]]=-(now);
now++;
X.push_back(A[i+1]);
Y.push_back(A[i+1]);
}
else Y[-C[A[i]]]=A[i+1];
This[A[i]]++;
}*/
}
for(i=1;i<now;i++) x.push_back(X[i]);
for(i=1;i<now;i++) y.push_back(Y[i]);
answer(C,x,y);
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
23 ms |
2440 KB |
Output is correct |
3 |
Correct |
20 ms |
1980 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Runtime error |
3 ms |
1476 KB |
Execution killed with signal 11 |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
23 ms |
2440 KB |
Output is correct |
3 |
Correct |
20 ms |
1980 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Runtime error |
3 ms |
1476 KB |
Execution killed with signal 11 |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
23 ms |
2440 KB |
Output is correct |
3 |
Correct |
20 ms |
1980 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Runtime error |
3 ms |
1476 KB |
Execution killed with signal 11 |
6 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
204 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |