이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "brperm.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define fi first
#define se second
#define mp make_pair
vector<char> S;
void init(int n, const char s[]) {
for(int i = 0 ; i < n; i ++ ){
S.push_back(s[i]);
}
}
int query(int i, int k) {
int sz = (1 << k);
//if(i + sz - 1 >= S.size()) return 0;
vector<char> A(sz), B(sz);
for(int j = 0 ; j < sz; j ++ ){
A[j] = S[i + j];
int f = 0;
for(int p = 0; p < k ; p ++ ){
if((j & (1 << p))){
f |= (1 << (k - p - 1));
}
}
B[f] = S[i + j];
}
return (A == B);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |