Submission #139259

# Submission time Handle Problem Language Result Execution time Memory
139259 2019-07-31T13:39:59 Z wilwxk Mechanical Doll (IOI18_doll) C++14
2 / 100
39 ms 2180 KB
#include "doll.h"
#include <bits/stdc++.h>
using namespace std;

const int MAXN=2e5+5;
vector<int> c, x, y;
int n, m, respf;

void debug() {
  for(auto cur : c) printf("%d ", cur); cout << endl;
  for(auto cur : x) printf("%d ", cur); cout << endl;
  for(auto cur : y) printf("%d ", cur); cout << endl;
}

void create_circuit(int M, std::vector<int> A) {
  n=A.size(); m=M; respf=1;
  c.resize(m+1); fill(c.begin(), c.end(), 0);

  int cur=0;
  for(int i=0; i<=n; i++) c[cur]=A[i], cur=A[i];
  
  
  answer(c, x, y);
}

Compilation message

doll.cpp: In function 'void debug()':
doll.cpp:10:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   10 |   for(auto cur : c) printf("%d ", cur); cout << endl;
      |   ^~~
doll.cpp:10:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   10 |   for(auto cur : c) printf("%d ", cur); cout << endl;
      |                                         ^~~~
doll.cpp:11:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   11 |   for(auto cur : x) printf("%d ", cur); cout << endl;
      |   ^~~
doll.cpp:11:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   11 |   for(auto cur : x) printf("%d ", cur); cout << endl;
      |                                         ^~~~
doll.cpp:12:3: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
   12 |   for(auto cur : y) printf("%d ", cur); cout << endl;
      |   ^~~
doll.cpp:12:41: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
   12 |   for(auto cur : y) printf("%d ", cur); cout << endl;
      |                                         ^~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 20 ms 1972 KB Output is correct
3 Correct 16 ms 1484 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 11 ms 1356 KB Output is correct
6 Correct 39 ms 2180 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 20 ms 1972 KB Output is correct
3 Correct 16 ms 1484 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 11 ms 1356 KB Output is correct
6 Correct 39 ms 2180 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Incorrect 25 ms 2096 KB wrong motion
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 20 ms 1972 KB Output is correct
3 Correct 16 ms 1484 KB Output is correct
4 Correct 1 ms 204 KB Output is correct
5 Correct 11 ms 1356 KB Output is correct
6 Correct 39 ms 2180 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Incorrect 25 ms 2096 KB wrong motion
9 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB wrong motion
2 Halted 0 ms 0 KB -