QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#323241#148. BrpermCamillus0 1055ms4728kbC++20972b2024-02-09 00:13:142024-02-09 00:13:16

Judging History

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

  • [2024-02-09 00:13:16]
  • 评测
  • 测评结果:0
  • 用时:1055ms
  • 内存:4728kb
  • [2024-02-09 00:13:14]
  • 提交

answer

#define debug(...) 42
#include "bits/stdc++.h"
using namespace std;

#ifndef LOCAL
#include "brperm.h"
#else
void init(int n, const char s[]);
int query(int i, int k);
#endif

string s;

void init(int N, const char S[]) {
    s = string(S, S + N);
}

int swapped(int i, int k) {
    int a = 1;
    int b = 1 << (k - 1);

    if (bool(i & a) == bool(i & b)) {
        return i;
    } else {
        i ^= a;
        i ^= b;
        return i;
    }
}

int query(int i, int k) {
    string t(s.begin() + i, s.begin() + i + (1 << k));
    debug(t);
    // for (int j = 0; j < (1 << k); j++) {
    //     if (t[j] != t[swapped(j, k)]) {
    //         return false;
    //     }
    // }
    return true;
}

#ifdef LOCAL
char __s[(int)5e5 + 10] = {};

int main() {
    cin >> __s;
    init(strlen(__s), __s);

    int __x, __y;
    while (cin >> __x >> __y)
        cout << query(__x, __y) << '\n';

    return 0;
}
#endif

详细

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
Wrong Answer

Test #6:

score: 0
Wrong Answer
time: 1055ms
memory: 4728kb

input:

bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb...

output:

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

result:

wrong answer 1st lines differ - expected: '0', found: '1'

Subtask #4:

score: 0
Skipped

Dependency #1:

0%