Submission #596659

#TimeUsernameProblemLanguageResultExecution timeMemory
596659pedroslreyBrperm (RMI20_brperm)C++14
50 / 100
27 ms1608 KiB
#include <bits/stdc++.h> #include "brperm.h" using namespace std; const int MAXN = 1010; char str[MAXN]; void init(int n, const char ss[]) { for (int i = 0; i < n; ++i) str[i] = ss[i]; } int query(int x, int k) { for (int mask = 0; mask < (1 << k); ++mask) { int rev = 0; for (int i = 0; i < k; ++i) if (mask & (1 << i)) rev |= 1 << (k - 1 - i); if (str[x + mask] != str[x + rev]) return 0; } return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...