Submission #1065005

# Submission time Handle Problem Language Result Execution time Memory
1065005 2024-08-18T21:17:46 Z hyakup Mechanical Doll (IOI18_doll) C++17
0 / 100
7 ms 3968 KB
#include "doll.h"
#include <bits/stdc++.h>
using namespace std;

void create_circuit(int M, vector<int> A ) {
  A.push_back(0);
  int n = A.size(), m = M;
  vector<int> c(m + 1), x(n), y(n);
  c[0] = A[0];
  for( int i = 0; i < n; i++ ) x[i] = y[i] = -( i + 1 );
  for( int i = 1; i <= m; i++ ) c[i] = -i;
  for( int i = 0; i + 1 < n; i++ ){
    swap( x[A[i] - 1], y[A[i] - 1] );
    y[A[i] - 1] = A[i + 1];
  }
  answer( c, x, y );
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Runtime error 7 ms 3968 KB Execution killed with signal 11
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Runtime error 7 ms 3968 KB Execution killed with signal 11
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Runtime error 7 ms 3968 KB Execution killed with signal 11
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB wrong motion
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB wrong motion
2 Halted 0 ms 0 KB -