Submission #652616

# Submission time Handle Problem Language Result Execution time Memory
652616 2022-10-23T14:03:59 Z MilosMilutinovic Question (Grader is different from the original contest) (CEOI14_question_grader) C++14
0 / 100
67 ms 47972 KB
const int N=1000;
int ff1[N][12],tsz1=0;
int encode(int n,int x,int y) {
	for (int i=0;i<(1<<12);i++) if (__builtin_popcount(i)==6) {
		++tsz1;
		for (int j=0;j<12;j++) if (i>>j&1) ff1[tsz1][j]=1;
	}
	for (int i=0;i<12;i++) if (ff1[x][i]&&!ff1[y][i]) return i+1;
	return 12;
}
const int N=1000;
int ff2[N][12],tsz2;
int decode(int n,int q,int h) {
	for (int i=0;i<(1<<12);i++) if (__builtin_popcount(i)==6) {
		++tsz2;
		for (int j=0;j<12;j++) if (i>>j&1) ff2[tsz2][j]=1;
	}
	return ff2[q][h-1];
}
# Verdict Execution time Memory Grader output
1 Runtime error 67 ms 47964 KB Execution killed with signal 11
2 Runtime error 58 ms 47972 KB Execution killed with signal 11