Submission #100951

# Submission time Handle Problem Language Result Execution time Memory
100951 2019-03-15T11:46:37 Z E869120 Question (Grader is different from the original contest) (CEOI14_question_grader) C++14
0 / 100
6 ms 776 KB
int T0, E0[924][12];

int encode (int n, int x, int y) {
	if (T0 == 0) {
		for (int i = 0; i < 4096; i++) {
			int bit[12]; for (int j = 0; j < 12; j++) bit[j] = (i / (1 << j)) % 2;
			int cnt = 0;
			for (int j = 0; j < 12; j++) cnt += bit[j];
			if (cnt == 6) {
				for (int j = 0; j < 12; j++) E0[T0][j] = bit[j];
				T0++;
			}
		}
	}
	
	for (int i = 0; i < 12; i++) {
		if (E0[x][i] == 1 && E0[y][i] == 0) return i;
	}
}

Compilation message

encoder.cpp: In function 'int encode(int, int, int)':
encoder.cpp:19:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 776 KB Output isn't correct
2 Incorrect 6 ms 768 KB Output isn't correct