# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
642705 | TimDee | Brperm (RMI20_brperm) | C++17 | 4 ms | 1908 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "brperm.h"
#include <bits/stdc++.h>
using namespace std;
string S;
void init(int n, const char s[]) {
for (int i=0; i<n; ++i) S.push_back(s[i]);
}
int query(int ind, int k) {
//++k;
for (int i=ind; i<ind+(1<<k); ++i) {
int j=0;
for (int b=k-1; b>=0; --b) {
j+=(((i-ind)>>b)&1)<<(k-1-b);
}
if ((j+ind>=S.length())) exit(1);
if (S[i]!=S[j+ind]) return false;
}
return true;
}
Compilation message (stderr)
# | 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... |