QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#138981 | #148. Brperm | bashkort# | 13 | 39ms | 6368kb | C++20 | 667b | 2023-08-12 15:27:56 | 2024-07-04 01:38:19 |
Judging History
answer
#include "brperm.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
namespace {
string st;
vector<int> rev;
}
void init(int n, const char s[]) {
st.resize(n);
for (int i = 0; i < n; ++i) {
st[i] = s[i];
}
return;
}
int query(int x, int k) {
int n = 1 << k;
rev.resize(n);
for (int i = 1; i < n; ++i) {
rev[i] = (rev[i >> 1] >> 1) + (i & 1) * n / 2;
}
for (int i = 0; i < n; ++i) {
if (x + rev[i] >= size(st)) {
return 0;
}
if (st[x + i] != st[x + rev[i]]) {
return 0;
}
}
return 1;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 13
Accepted
Test #1:
score: 13
Accepted
time: 35ms
memory: 6368kb
input:
ykkubxafnylfriivjjqphltuagfkfcoigfcukuisdgufezomndodalbusgesraatkgnskdsiedfysodmsemmtjuoiezoaqljdodegogedjfpfwntljpgdhswtmqtwtpnbaawfumskuiwjodtsrlhblpunzqjkrzaakamjzyumkzfdjxwdkadgbwffjmldsfbhaltfnykbmvnxdkpfzsswpnmyyqpalsalaeqmqqivzqyhjgiiwfugmpxxsmkkgecuvrnlkujbyllhecpjsneluvsyckueeexhbtuhikfzuvw...
output:
0 1 0 1 1 0 1 1 1 0 0 1 1 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 1 0 1 1 1 1 0 0 1 0 0 0 1 1 1 1 1 1 0 1 0 0 1 1 1 1 0 1 0 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 1 0 1 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 1 1 0 1 1 0 0 0 0 1 0 0 1 1 1 1 1 0 ...
result:
ok 1000 lines
Test #2:
score: 0
Accepted
time: 39ms
memory: 5696kb
input:
qytnjgmxfvhrgflrfktkttxvrftktiffaimtwsuflrvflacgltptqwyhvtytpmtlcftxyudiogevzswhhzplvdrvjhvileplggptfgmgdvehzodzazxgmyzsdowekeldhyngdxaoidkjydlhyabgthtzyzdlwkovtmlfedeeketvdwypbxlplnqwldypolfrtzqmeaezhefeiekhsfykkikslcwehplfobxalbqioelvalobhnalvnilbibnloeinzjxcmbvltcrdvdcjrlbebjdecqlflejadfeizhvsylp...
output:
0 1 0 1 1 1 1 1 0 1 0 1 1 0 1 1 0 0 1 1 0 0 1 0 1 1 1 0 1 0 1 0 0 1 1 1 1 1 1 1 1 1 0 0 1 1 1 1 1 0 0 0 1 1 1 0 0 1 1 1 0 1 1 0 0 0 1 0 0 1 1 1 1 1 0 0 0 0 1 1 1 1 0 1 0 0 1 0 0 0 1 0 1 0 0 1 1 1 0 1 0 0 0 0 0 1 1 0 0 1 0 0 1 1 1 0 0 1 1 0 1 0 0 0 1 1 1 0 1 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 1 1 0 1 1 0 ...
result:
ok 1000 lines
Subtask #2:
score: 0
Time Limit Exceeded
Dependency #1:
100%
Accepted
Test #3:
score: 0
Time Limit Exceeded
input:
rsufzafbpxjkrmubvscneqiybldroqajxbazpqccqthkdqgsiukjicklhvisezmlrkofmplwgrpanulsknxxzuiovforkarjqwfqdsqmitupfumbsisykznbpvhvntpkfrzajusffhmopgxgrxtisguptwnkftwryxqzeifbyvrieczlfvpzfbxdpryejqmykjaehxmylarbpjgkxrumngzsmapsneinpczjoiaepikvgvvpnsoexvwnfimqarnmxnkcsfddmhgfylrepscljvyrnoprauklhbqxbslivtsr...
output:
0 1 1 0 1 0 0 1 1 0 0 0 1 0 0 1 0 0 0 0 0 1 1 1 1 1 0 0 0 1 1 0 1 1 0 1 0 1 1 1 0 1 1 0 0 0 0 0 1 0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