QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#221012#148. BrpermAhmed57#0 0ms0kbC++23668b2023-10-21 01:58:592024-07-04 02:21:07

Judging History

你现在查看的是最新测评结果

  • [2024-07-04 02:21:07]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-10-21 01:58:59]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#include "brperm.h"

string str;int lol[20][500001];
void init(int n, const char s[]){
    for(int i = 0;i<n;i++){
        str+=s[i];
    }
    for(int k = 0;(1<<k)<=n;k++){
        for(int i = 0;i<(1<<k);i++){
            lol[k][i] = 0;
            for(int j = 0;j<k;j++){
                if(i&(1<<j)){
                    lol[k][i]|=(1<<(k-j-1));
                }
            }
        }
    }
}
int query(int i , int k){
    if(i+(1<<k)-1>str.size())assert(0);
    for(int l = i;l<i+(1<<k);l++){
        if(str[l]!=str[lol[k][l-i]+i]){
            return 0;
        }
    }
    return 1;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Runtime Error

Test #1:

score: 0
Runtime Error

input:

ykkubxafnylfriivjjqphltuagfkfcoigfcukuisdgufezomndodalbusgesraatkgnskdsiedfysodmsemmtjuoiezoaqljdodegogedjfpfwntljpgdhswtmqtwtpnbaawfumskuiwjodtsrlhblpunzqjkrzaakamjzyumkzfdjxwdkadgbwffjmldsfbhaltfnykbmvnxdkpfzsswpnmyyqpalsalaeqmqqivzqyhjgiiwfugmpxxsmkkgecuvrnlkujbyllhecpjsneluvsyckueeexhbtuhikfzuvw...

output:


result:


Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 0
Runtime Error

Test #6:

score: 0
Runtime Error

input:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

output:


result:


Subtask #4:

score: 0
Skipped

Dependency #1:

0%