Submission #827247

#TimeUsernameProblemLanguageResultExecution timeMemory
827247rainboyBrperm (RMI20_brperm)C11
0 / 100
100 ms2272 KiB
#include "brperm.h" #define N 500000 char cc[N + 1]; int n; void init(int n_, const char *cc_) { int i; n = n_; for (i = 0; i < n; i++) cc[i] = cc_[i]; } int query(int i_, int k) { int n_, m, i, j; n_ = 1 << k; for (i = 0, j = 1; j < n_; j++) { for (m = n_ >> 1; ((i ^= m) & m) == 0; m >>= 1) ; if (cc[i_ + i] != cc[i_ + j]) 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...