답안 #542651

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
542651 2022-03-27T12:41:48 Z __Variatto 비밀 (JOI14_secret) C++17
컴파일 오류
0 ms 0 KB
#include <bits/stdc++.h>
#include "secret.h"
using namespace std;
#define pb push_back
#define fi first
#define se second
#define ll long long
const int MAX=1e3+10, L=10;
int n, daq[MAX][L], q, a, b, t[MAX], pot;
int Secret(int a, int b){
    return 0;
}
int Query(int l, int r){
    if(l==r) return t[l];
    int x=__builtin_clz(l^r);
    return Secret(daq[l][x], daq[r][x]);
}
void rek(int pocz, int kon, int nr){
    if(pocz==kon){
        daq[pocz][nr]=t[pocz];
        return;
    }
    int sr=(pocz+kon)/2;
    daq[sr][nr]=t[sr];
    int akt=t[sr];
    for(int i=sr-1; i>=pocz; i--)
        daq[i][nr]=Secret(daq[i+1][nr], t[i]);
    for(int i=sr+1; i<=kon; i++)
        daq[i][nr]=Secret(daq[i-1][nr], t[i]);
    rek(pocz, sr, nr-1);
    rek(sr+1, kon, nr-1);
}
void Init(int N, int A[]){
    n=N;
    for(int i=0; i<n; i++)
        t[i]=A[i];
    while((1<<pot)<n) pot++;
    rek(0, n-1, pot);
}
/*int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    
}*/

Compilation message

secret.cpp: In function 'void rek(int, int, int)':
secret.cpp:25:9: warning: unused variable 'akt' [-Wunused-variable]
   25 |     int akt=t[sr];
      |         ^~~
/usr/bin/ld: /tmp/ccNFFqUl.o: in function `Secret(int, int)':
secret.cpp:(.text+0x0): multiple definition of `Secret(int, int)'; /tmp/ccA2Z0ri.o:grader-full.cpp:(.text+0x2d0): first defined here
collect2: error: ld returned 1 exit status