제출 #310768

#제출 시각아이디문제언어결과실행 시간메모리
310768LucaDantas앵무새 (IOI11_parrots)C++17
컴파일 에러
0 ms0 KiB
#include "encoder.h"
#include "encoderlib.h"
#include "opa.h"
#include<stdio.h>

// void bit(int n) {
// 	for(int i = 0; i < 8; i++)
// 		if(n&(1<<i))
// 			putchar('1');
// 		else
// 			putchar('0');
// }

void encode(int N, int M[])
{
	for(int i = 0; i < N; i++) {
		for(int cnt = 0; cnt < 4; cnt++) {
			int here = i;
			here += (cnt << 6);
			here += (M[i]&(3<<(2*cnt)))<<(4-(2*cnt));
			// bit(here); putchar(' ');
			send(here);
		}
		// puts("");
	}
	// puts("");
}
#include "decoder.h"
#include "decoderlib.h"
#include "opa.h"
#include<cstdio>
#include<cstring>
#include<algorithm>

// void opa(int n) {
// 	for(int i = 0; i < 8; i++)
// 		if(n&(1<<i))
// 			putchar('1');
// 		else
// 			putchar('0');
// }

int pos[1<<4][4], cnt[1<<4];

void decode(int N, int L, int X[])
{
	memset(cnt, 0, sizeof cnt);
	for(int i = 0; i < L; i++)
		pos[X[i]&15][cnt[X[i]&15]++] = X[i];
	for(int i = 0; i < N; i++) {
		std::sort(pos[i], pos[i]+4);
		int here = 0;
		for(int j = 0; j < 4; j++) {
			// opa(pos[i][j]); putchar(' ');
			pos[i][j] >>= 4;
			pos[i][j] &= 3;
			// printf("%d ", pos[i][j]);
			here += pos[i][j] << (2*j);
			// opa(here); putchar(' ');
		}
		// puts("");
		// printf("%d\n", here);
		output(here);
	}
	// puts("");
}

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

encoder.cpp:3:10: fatal error: opa.h: No such file or directory
    3 | #include "opa.h"
      |          ^~~~~~~
compilation terminated.

decoder.cpp:3:10: fatal error: opa.h: No such file or directory
    3 | #include "opa.h"
      |          ^~~~~~~
compilation terminated.