답안 #457491

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
457491 2021-08-07T07:47:31 Z AdamGS Brperm (RMI20_brperm) C++14
컴파일 오류
0 ms 0 KB
#include "brperm.h"
#include<bits/stdc++.h>
using namespace std;
#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;
int n;
char T[LIM];
void init(int x, const char s[]) {
        n=x;
        rep(i, n) T[i]=s[i];
}
int odw(int x, int k) {
        int ans=0;
        rep(i, k) {
                if(x&(1<<i)) ans+=1<<(k-i-1);
        }
        return ans;
}
int querry(int i, int k) {
        rep(j, 1<<k) {
                if(T[i+j]!=T[i+odw(j, k)]) return 0;
        }
        return 1;
}

Compilation message

/usr/bin/ld: /tmp/ccvcbwcR.o: in function `main':
grader.cpp:(.text.startup+0x89): undefined reference to `query(int, int)'
collect2: error: ld returned 1 exit status