Submission #827212

# Submission time Handle Problem Language Result Execution time Memory
827212 2023-08-16T09:58:12 Z rainboy Brperm (RMI20_brperm) C
0 / 100
96 ms 3032 KB
#include "brperm.h"

#define N	500000

char cc[N + 1];

void init(int n, const char *cc_) {
	for (int i = 0; i < n; i++)
		cc[i] = cc_[i];
}

int query(int i_, int k) {
	int n_ = 1 << k;
	for (int i = 0, j = 1; j < n_; j++) {
		for (int m = n_ >> 1; ((i ^= m) & m) == 0; m >>= 1)
			;
		if (cc[i_ + i] != cc[i_ + j])
			return 0;
	}
	return 1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 96 ms 3032 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -