# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
645939 |
2022-09-28T10:15:33 Z |
Vanilla |
Brperm (RMI20_brperm) |
C++17 |
|
142 ms |
5372 KB |
#include <bits/stdc++.h>
#include "brperm.h"
using namespace std;
int n;
string s;
void init(int n, const char s[]) {
::n = n;
for (int i = 0; i < n; i++){
::s.push_back(s[i]);
}
return;
}
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;
}
int query(int l, int k) {
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]);
}
// cout << s1 << "\n" << s2 << "\n";
// cout << v1 << "\n" << v2 << "\n\n";
return s1 == s2;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
142 ms |
5372 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1 ms |
468 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |