제출 #1218403

#제출 시각아이디문제언어결과실행 시간메모리
1218403damamilaBrperm (RMI20_brperm)C++20
13 / 100
3095 ms2016 KiB
#include <bits/stdc++.h> using namespace std; //~ #define int long long string str; int N; void init(int n, const char s[]) { N = n; //~ str = s; for (int i = 0; i < n; i++) str.push_back(s[i]); } int query(int i, int k) { //~ cout << i << " " << k << ": " << endl; if (i+(1<<k) > N) { //~ cout << "00" << endl; return 0; } bool ja = 1; for (int j = 0; j < (1<<k); j++) { int t = 0; for (int l = 0; l <= k; l++) { if (j&(1<<l)) t += (1<<(k-l-1)); } //~ cout << j << " " << t << " " << str[j+i] << " " << str[t+i] << endl; if (str[t+i] != str[j+i]) ja = 0; } //~ cout << ja << endl; return ja; } //~ signed main() { //~ ios::sync_with_stdio(false); //~ cin.tie(0); //~ cout.tie(0); //~ init(8, "axxyxxyb"); //~ query(0, 3); //~ query(1, 1); //~ query(0, 2); //~ query(3, 2); //~ }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...