Submission #1224250

#TimeUsernameProblemLanguageResultExecution timeMemory
1224250Sir_Ahmed_ImranBrperm (RMI20_brperm)C++17
0 / 100
3094 ms1428 KiB
#include "brperm.h" #include <bits/stdc++.h> using namespace std; #define N 500001 #define nl '\n' #define ff first #define ss second #define add insert #define ll long long #define ld long double #define terminator main #define pll pair<ll,ll> #define append push_back #define pii pair<int,int> #define all(x) (x).begin(),(x).end() #define L0TA ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL) char a[N]; int rev(int x, int k){ int ans = 0; for(int i = 0; i < k; i++) if((x >> i) & 1) ans += (1 << (k - i - 1)); return ans; } void init(int n, const char s[]) { for(int i = 0; i < n; i++) a[i] = s[i]; } int query(int n, int k) { for(int i = n; i < n + (1 << k); i++) if(a[i] != a[n + rev(i - n, 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...