제출 #516162

#제출 시각아이디문제언어결과실행 시간메모리
516162tabr앵무새 (IOI11_parrots)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;
#ifdef tabr
#include "library/debug.cpp"
#else
#define debug(...)
#endif

#if __has_include "encoder.h"
#include "encoder.h"
#include "encoderlib.h"

void encode(int n, int a[]) {
    for (int i = 0; i < n; i++) {
        send(a[i] + 256 * i);
    }
}
#endif

#if __has_include "decoder.h"
#include "decoder.h"
#include "decoderlib.h"

void decode(int n, int l, int a[]) {
    sort(a, a + l);
    for (int i = 0; i < n; i++) {
        output(a[i] % 256);
    }
}
#endif

#ifdef tabr
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    return 0;
}
#endif
#include <bits/stdc++.h>
using namespace std;
#ifdef tabr
#include "library/debug.cpp"
#else
#define debug(...)
#endif

#if __has_include "encoder.h"
#include "encoder.h"
#include "encoderlib.h"

void encode(int n, int a[]) {
    for (int i = 0; i < n; i++) {
        send(a[i] + 256 * i);
    }
}
#endif

#if __has_include "decoder.h"
#include "decoder.h"
#include "decoderlib.h"

void decode(int n, int l, int a[]) {
    sort(a, a + l);
    for (int i = 0; i < n; i++) {
        output(a[i] % 256);
    }
}
#endif

#ifdef tabr
int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    return 0;
}
#endif

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

encoder.cpp:9:19: error: missing '(' before "__has_include" operand
    9 | #if __has_include "encoder.h"
      |                   ^~~~~~~~~~~
encoder.cpp:20:19: error: missing '(' before "__has_include" operand
   20 | #if __has_include "decoder.h"
      |                   ^~~~~~~~~~~

decoder.cpp:9:19: error: missing '(' before "__has_include" operand
    9 | #if __has_include "encoder.h"
      |                   ^~~~~~~~~~~
decoder.cpp:20:19: error: missing '(' before "__has_include" operand
   20 | #if __has_include "decoder.h"
      |                   ^~~~~~~~~~~