Submission #850982

# Submission time Handle Problem Language Result Execution time Memory
850982 2023-09-18T06:07:07 Z alexdd Brperm (RMI20_brperm) C++17
0 / 100
3000 ms 2244 KB
#include "brperm.h"
#include<bits/stdc++.h>
using namespace std;
int n;
static char s[500005];
int inv(int x, int p)
{
    int aux=0;
    for(int i=0;i<p;i++)
    {
        if(((1<<i)&x))
        {
            aux += (1<<(p-i-1));
        }
    }
    return aux;
}
void init(int N, const char cit[])
{
    n=N;
    for(int i=0;i<n;i++)
        s[i]=cit[i];
    return;
}

int query(int i, int k)
{
    int lun=(1<<k);
    for(int x=0;x<lun;x++)
    {
        if(s[i+x]!=s[i+inv(x,k)])
            return 0;
    }
    return 1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 15 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 15 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 3066 ms 2244 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 15 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -