Submission #83856

# Submission time Handle Problem Language Result Execution time Memory
83856 2018-11-11T12:37:14 Z faceless Question (Grader is different from the original contest) (CEOI14_question_grader) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#define MP make_pair
#define F first
#define PB push_back
#define S second
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
const int maxn = 200 + 4;

int numbit (int mask) {
	int ret = 0;
	while (mask) {
		mask -= mask & -mask;
		ret ++;
	}
	return ret;
}

int to[2000];

int main (){
	int n, x, y;
	cin >> n >> x >> y;
	int tmp = 1;
	for (int mask = 0; mask < (1 << 12); mask ++) {
		if (numbit (mask) == 6) {
			to[tmp ++] = mask;
		}
	}
	for (int i = 0; i < 12; i++) {
		if (to[x] & (1 << i) and (to[y] & (1 << i)) == 0)
			return i + 1;
	}
}
#include <bits/stdc++.h>
#define MP make_pair
#define F first
#define PB push_back
#define S second
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
const int maxn = 200 + 4;

int numbit (int mask) {
	int ret = 0;
	while (mask) {
		mask -= mask & -mask;
		ret ++;
	}
	return ret;
}

int to[2000];

int main (){
	int n, q, h;
	cin >> n >> q >> h;
	int tmp = 1;
	for (int mask = 0; mask < (1 << 12); mask ++) {
		if (numbit (mask) == 6) {
			to[tmp ++] = mask;
		}
	}

	int mask = to[q];
	if (mask & (1 << (h - 1)))
		return 1;
	return 0;
}

Compilation message

/tmp/ccZWKru7.o: In function `main':
grader_encode.c:(.text.startup+0x0): multiple definition of `main'
/tmp/ccuCYNPV.o:encoder.cpp:(.text.startup+0x0): first defined here
/tmp/ccZWKru7.o: In function `main':
grader_encode.c:(.text.startup+0x10a): undefined reference to `encode(int, int, int)'
collect2: error: ld returned 1 exit status

/tmp/cct2VIRg.o: In function `main':
grader_decode.c:(.text.startup+0x0): multiple definition of `main'
/tmp/cckIQSi0.o:decoder.cpp:(.text.startup+0x0): first defined here
/tmp/cct2VIRg.o: In function `main':
grader_decode.c:(.text.startup+0x19f): undefined reference to `decode(int, int, int)'
collect2: error: ld returned 1 exit status