# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
645983 |
2022-09-28T11:34:54 Z |
Vanilla |
Brperm (RMI20_brperm) |
C++17 |
|
3000 ms |
2956 KB |
#include <bits/stdc++.h>
#include "brperm.h"
using namespace std;
int n;
string s = "";
int rev (int x, int k) {
int b = 0;
for (int i = 0; i < k; i++){
if ((1 << (k - i - 1)) & x) b+=(1 << i);
}
return b;
}
void init(int N, const char S[]) {
n = N;
s = "";
for (int i = 0; i < n; i++){
s.push_back(S[i]);
}
return;
}
int query(int l, int k) {
if (l + (1 << k) >= n) return 0;
string s1 = "", s2 = "";
for (int i = l; i <= l + (1 << k) - 1; i++){
s1.push_back(s[i]);
s2.push_back(s[rev(i - l, k) + l]);
}
return s1 == s2;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
3061 ms |
2956 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |