#include <bits/stdc++.h>
#ifndef SKY
#include "doll.h"
#endif // SKY
using namespace std;
#define N 510
#define ll long long
#define fs first
#define sc second
#define ii pair<int,int>
#define pb push_back
#ifdef SKY
void answer(vector<int>C,vector<int>X,vector<int>Y)
{
cout<<"OK";
}
#endif // SKY
void create_circuit(int M, vector<int> A)
{
vector<int>X,Y,C(M+1);
for(int i=0;i<=M;i++)
C[i]=i;
C[0]=A[0];
C[A.back()]=0;
for(int i=0;i<A.size()-1;i++)
C[A[i]]=A[i+1];
answer(C,X,Y);
}
#ifdef SKY
int main()
{
freopen("A.inp","r",stdin);
freopen("A.out","w",stdout);
ios::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
return 0;
}
#endif
Compilation message
doll.cpp: In function 'void create_circuit(int, std::vector<int>)':
doll.cpp:30:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
30 | for(int i=0;i<A.size()-1;i++)
| ~^~~~~~~~~~~
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
15 ms |
2344 KB |
Output is correct |
3 |
Correct |
12 ms |
2004 KB |
Output is correct |
4 |
Correct |
1 ms |
296 KB |
Output is correct |
5 |
Correct |
9 ms |
1364 KB |
Output is correct |
6 |
Correct |
21 ms |
2860 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 |
15 ms |
2344 KB |
Output is correct |
3 |
Correct |
12 ms |
2004 KB |
Output is correct |
4 |
Correct |
1 ms |
296 KB |
Output is correct |
5 |
Correct |
9 ms |
1364 KB |
Output is correct |
6 |
Correct |
21 ms |
2860 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Incorrect |
18 ms |
2984 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 |
15 ms |
2344 KB |
Output is correct |
3 |
Correct |
12 ms |
2004 KB |
Output is correct |
4 |
Correct |
1 ms |
296 KB |
Output is correct |
5 |
Correct |
9 ms |
1364 KB |
Output is correct |
6 |
Correct |
21 ms |
2860 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Incorrect |
18 ms |
2984 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 |
1 ms |
212 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
212 KB |
wrong motion |
2 |
Halted |
0 ms |
0 KB |
- |