# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
478738 |
2021-10-08T08:15:36 Z |
Tenis0206 |
Brperm (RMI20_brperm) |
C++14 |
|
3000 ms |
1864 KB |
#include <bits/stdc++.h>
#include "brperm.h"
using namespace std;
const int Mod = 1e9 + 7;
const int b = 31;
char a[500005];
void init(int n, const char s[])
{
for(int i=0;i<n;i++)
{
a[i] = s[i];
}
}
int query(int poz, int k)
{
for(int i=poz;i<=poz+(1<<k)-1;i++)
{
int p = i - poz;
int val = 0;
for(int b=0;b<k;b++)
{
if((p&(1<<b))!=0)
{
val+=(1<<(k-b-1));
}
}
if(a[poz+val]!=a[i])
{
return false;
}
}
return true;
}
/*int main()
{
freopen("nr.in","r",stdin);
freopen("nr.out","w",stdout);
int n,q;
char s[1000005];
cin>>n;
cin>>s;
init(n,s);
cin>>q;
for(int i=1;i<=q;i++)
{
int poz,k;
cin>>poz>>k;
cout<<query(poz,k)<<'\n';
}
return 0;
}
*/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
17 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
17 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
3058 ms |
1864 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
17 ms |
332 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |