답안 #713770

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
713770 2023-03-23T03:25:09 Z PixelCat 자동 인형 (IOI18_doll) C++14
47 / 100
91 ms 10152 KB
#ifdef NYAOWO
#include "grader.cpp"
#define OUT_VEC(x) { cout << #x << ":"; { for(auto &IT:x) cout << " " << IT; } cout << "\n" << flush; }
#else
#define OUT_VEC(x)
#endif
#include "doll.h"

#include <bits/stdc++.h>
#define For(i, a, b) for(int i = a; i <= b; i++)
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define sz(x) ((int)x.size())
#define eb emplace_back
using namespace std;
using LL = long long;
using pii = pair<int, int>;

const int MAXM = 100010;

vector<int> x, y;

int solve(vector<int> &v, int l, int r) {
    if(l == r) return v[l];
    int m = (l + r) / 2;
    int id = sz(x);
    x.eb(0); y.eb(0);
    int a = solve(v, m + 1, r);
    int b = solve(v, l, m);
    x[id] = a; y[id] = b;
    // cout << l << " " << r << " " << id << " " << x[id] << " " << y[id] << " " << (-(id + 1)) << "\n" << flush;
    return -(id + 1);
}

void create_circuit(int M, std::vector<int> A) {
    A.eb(0);
    vector<int> ans(M + 1, -1);
    reverse(all(A));
    ans[0] = A.back();
    A.pop_back();

    int lgn = __lg(sz(A) - 1) + 1;
    int n = (1 << lgn);
    while(sz(A) < n) A.eb(-1);
    {
        int j = 0;
        For(i, 0, n - 1) {
            if(i < j) swap(A[i], A[j]);
            for(int k = n >> 1; (j ^= k) < k; k >>= 1);
        }
    }

    solve(A, 0, n - 1);
    OUT_VEC(ans);
    OUT_VEC(x);
    OUT_VEC(y);
    answer(ans, x, y);
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 0 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 1 ms 212 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 0 ms 212 KB Output is partially correct
2 Correct 37 ms 5436 KB Output is correct
3 Partially correct 68 ms 8164 KB Output is partially correct
4 Partially correct 67 ms 9124 KB Output is partially correct
# 결과 실행 시간 메모리 Grader output
1 Partially correct 0 ms 212 KB Output is partially correct
2 Correct 37 ms 5436 KB Output is correct
3 Partially correct 68 ms 8164 KB Output is partially correct
4 Partially correct 67 ms 9124 KB Output is partially correct
5 Partially correct 72 ms 10152 KB Output is partially correct
6 Partially correct 74 ms 9908 KB Output is partially correct
7 Partially correct 73 ms 10028 KB Output is partially correct
8 Partially correct 91 ms 9756 KB Output is partially correct
9 Partially correct 60 ms 8160 KB Output is partially correct
10 Partially correct 67 ms 9692 KB Output is partially correct
11 Partially correct 71 ms 9512 KB Output is partially correct
12 Partially correct 57 ms 8072 KB Output is partially correct
13 Correct 49 ms 5956 KB Output is correct
14 Partially correct 77 ms 8316 KB Output is partially correct
15 Partially correct 60 ms 8452 KB Output is partially correct
16 Partially correct 2 ms 596 KB Output is partially correct
17 Correct 39 ms 5572 KB Output is correct
18 Correct 38 ms 5604 KB Output is correct
19 Partially correct 59 ms 8056 KB Output is partially correct
20 Partially correct 69 ms 9612 KB Output is partially correct
21 Partially correct 66 ms 9532 KB Output is partially correct
22 Partially correct 66 ms 9476 KB Output is partially correct