Submission #601764

# Submission time Handle Problem Language Result Execution time Memory
601764 2022-07-22T09:42:36 Z enerelt14 Mechanical Doll (IOI18_doll) C++14
10 / 100
1 ms 296 KB
#include "doll.h"
#include<bits/stdc++.h>
#define pb push_back
using namespace std;
int x[40], y[40];
vector<int>a;
bool is[40];
int tree[100], q;
void go(int id, int l, int r){
  if(l==r){
    if (q==16)tree[id]=-q;
    else tree[id]=a[q];
    return;
  }
  else tree[id]=-id;
  int mid=(l+r)/2;
  if (!is[id]){
    go(id*2, l, mid);
    x[id]=tree[id*2];
    is[id]=1;
  }
  else{
    go(id*2+1, mid+1, r);
    y[id]=tree[id*2+1];
    is[id]=0;
  }
}

void create_circuit(int M, vector<int>A){
    a=A;
    vector<int>c, X, Y;
    c.pb(a[0]);
    for (int i=1;i<=M;i++)c.pb(-1);
    for (int i=1;i<=16;i++){
        q=i;
        go(1, 1, 16);
    }
    x[16]=-16;
    y[16]=0;
    for (int i=1;i<=16;i++)X.pb(x[i]);
    for (int i=1;i<=16;i++)Y.pb(y[i]);    
    answer(c, X, Y);
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB wrong serial number
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB wrong serial number
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB wrong serial number
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 0 ms 212 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 1 ms 296 KB Output is correct
# 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 -