Submission #1070215

#TimeUsernameProblemLanguageResultExecution timeMemory
1070215AdamGSBrperm (RMI20_brperm)C++17
50 / 100
3012 ms1628 KiB
#include "brperm.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; #define rep(a, b) for(int a = 0; a < (b); ++a) #define st first #define nd second #define pb push_back #define all(a) a.begin(), a.end() const int LIM=5e5+7; char T[LIM]; int n; void init(int _n, const char s[]) { n=_n; rep(i, n) T[i]=s[i]; } int odw(int x, int k) { int y=0; rep(i, k) if(x&(1<<i)) y+=1<<(k-i-1); return y; } int query(int i, int k) { if(i+(1<<k)>n) return 0; rep(j, 1<<k) if(T[i+j]!=T[i+odw(j, k)]) 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...