제출 #1369298

#제출 시각아이디문제언어결과실행 시간메모리
1369298mohammadyay앵무새 (IOI11_parrots)C++20
컴파일 에러
0 ms0 KiB
#include "../../Downloads/parrots/parrots/encoder.h"
#include "../../Downloads/parrots/parrots/encoderlib.h"

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
using ll = long long;
#define pb push_back
#define eb emplace_back
#define pF first
#define pS second
#define SP << " " <<
ll a[40];

void encode(int N, int M[]) {
    ll n = N;
    for (int i = 0; i < n; i++) a[i] = M[i];

    for (int i = 0 ; i < n; i++) {
        ll k = 7, x = a[i];
        while (x > 0) {
            if (x >= (1<<k)) {
                send(i * 8 + k);
                x -= (1<<k);
            }
            k--;
        }
    }
}
#include "../../Downloads/parrots/parrots/decoder.h"
#include "../../Downloads/parrots/parrots/decoderlib.h"

#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
using ll = long long;
#define pb push_back
#define eb emplace_back
#define pF first
#define pS second
#define SP << " " <<
ll a[40];
bool b[300];

/** void encode(int N, int M[]) {
    ll n = N;
    for (int i = 0; i < n; i++) a[i] = M[i];

    for (int i = 0 ; i < n; i++) {
        ll k = 7, x = a[i];
        while (x > 0) {
            if (x >= (1<<k)) {
                send(i * 8 + k);
                x -= (1<<k);
            }
            k--;
        }
    }
}
 */

void decode(int N, int L, int X[]) {
    ll n = N, l = L;
    for (int i = 0; i < n; i++) a[i] = X[i];
    for (int i=0; i < n * 8; i++) b[i] = 0;
    for (auto i : a) b[i] = 1;
    ll ans;
    for (int i=0; i < n * 8; i++) {
        if (i && i % 8 == 0) {
            ans = 0;
            output(ans);
        }
        ans += (a[i] ? (1<<(i%8)) : 0);
    }
    output(ans);
}

컴파일 시 표준 에러 (stderr) 메시지

# 1번째 컴파일 단계

encoder.cpp:1:10: fatal error: ../../Downloads/parrots/parrots/encoder.h: No such file or directory
    1 | #include "../../Downloads/parrots/parrots/encoder.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.