답안 #596659

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
596659 2022-07-15T00:02:04 Z pedroslrey Brperm (RMI20_brperm) C++14
50 / 100
27 ms 1608 KB
#include <bits/stdc++.h>
#include "brperm.h"

using namespace std;

const int MAXN = 1010;

char str[MAXN];

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

int query(int x, int k) {
	for (int mask = 0; mask < (1 << k); ++mask) {
		int rev = 0;
		for (int i = 0; i < k; ++i)
			if (mask & (1 << i)) rev |= 1 << (k - 1 - i);

		if (str[x + mask] != str[x + rev]) return 0;
	}
	return 1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 27 ms 1508 KB Output is correct
4 Correct 27 ms 1608 KB Output is correct
5 Correct 27 ms 1472 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 2 ms 1364 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 27 ms 1508 KB Output is correct
4 Correct 27 ms 1608 KB Output is correct
5 Correct 27 ms 1472 KB Output is correct
6 Runtime error 2 ms 1364 KB Execution killed with signal 11
7 Halted 0 ms 0 KB -