답안 #48921

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
48921 2018-05-20T03:11:29 Z Benq 질문 (CEOI14_question_grader) C++14
컴파일 오류
0 ms 0 KB
#include#includ  <stdio.h>
#include <stdlib.h>
 
#define F0R(i, a) for (int i=0; i<(a); i++)
 
int num[2772], tot = (1<<12)-1;
 
void gen() {
	int nex = 0;
	F0R(i,1<<12) if (i&1) if (__builtin_popcount(i) == 6) num[nex++] = i;
}
 
int encode (int N, int x, int y) {
    if (!num[0]) gen();
	int z = num[x]&(tot^num[y]);
	F0R(i,12) if (z&(1<<i)) return i+1;
}
#include <stdio.h>
#include <stdlib.h>
 
#define F0R(i, a) for (int i=0; i<(a); i++)
 
int num[2772], tot = (1<<12)-1;
 
void gen() {
	int nex = 0;
	F0R(i,1<<12) if (i&1) if (__builtin_popcount(i) == 6) num[nex++] = i;
}
 
int decode (int N, int q, int h) {
    if (!num[0]) gen();
	h --;
	if (num[q]&(1<<h)) return 1;
	return 0;
}

Compilation message

encoder.cpp:2:9: error: #include expects "FILENAME" or <FILENAME>
 #include#includ  <stdio.h>
         ^
encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:18:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^