답안 #1035209

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1035209 2024-07-26T06:45:45 Z thinknoexit 최후의 만찬 (IOI12_supper) C++17
0 / 100
264 ms 81944 KB
#include "advisor.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int n;
void ComputeAdvice(int* C, int _N, int K, int M) {
    n = _N;
    int bit = 31 - __builtin_clz(n - 1);
    for (int j = 0;j < n;j++) {
        for (int i = bit;i >= 0;i--) {
            WriteAdvice((C[j] >> i) & 1);
        }
    }
}
#include "assistant.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int n;
bool in[100100];
queue<int> q[100100];
void Assist(unsigned char* A, int _N, int K, int R) {
    n = _N;
    int bit = 31 - __builtin_clz(n - 1);
    for (int i = 0;i < R; i += bit) {
        int now = 0;
        for (int j = i;j < i + bit;j++) now = (now << 1) | A[j];
        q[now].push(i / bit);
    }
    for (int i = 0;i < n;i++) q[i].push(n), in[i] = 1;
    priority_queue<pair<int, int>> pq;
    for (int i = 0;i < K;i++) pq.push({ q[i].front(), i });
    for (int i = 0;i < n;i++) {
        int req = GetRequest();
        q[req].pop();
        if (in[req]) continue;
        in[req] = 1;
        PutBack(pq.top().second);
        in[pq.top().second] = 0;
        pq.pop();
        pq.push({ q[req].front(), req });
    }
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 37 ms 68296 KB Error - Not putting back color when it is not on the scaffold
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 51 ms 69188 KB Error - Not putting back color when it is not on the scaffold
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 203 ms 79400 KB Error - Not putting back color when it is not on the scaffold
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 32 ms 68128 KB Error - advice is too long
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 241 ms 81936 KB Error - Not putting back color when it is not on the scaffold
2 Incorrect 241 ms 81868 KB Error - Not putting back color when it is not on the scaffold
3 Incorrect 228 ms 81820 KB Error - Not putting back color when it is not on the scaffold
4 Incorrect 259 ms 81936 KB Error - Not putting back color when it is not on the scaffold
5 Incorrect 235 ms 81936 KB Error - Not putting back color when it is not on the scaffold
6 Incorrect 248 ms 81868 KB Error - Not putting back color when it is not on the scaffold
7 Incorrect 239 ms 81932 KB Error - Not putting back color when it is not on the scaffold
8 Incorrect 264 ms 81936 KB Error - Not putting back color when it is not on the scaffold
9 Incorrect 258 ms 81804 KB Error - Not putting back color when it is not on the scaffold
10 Incorrect 259 ms 81944 KB Error - Not putting back color when it is not on the scaffold