Submission #487177

# Submission time Handle Problem Language Result Execution time Memory
487177 2021-11-14T18:59:07 Z AnasBenMoussa Secret (JOI14_secret) C++14
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
#include "secret.h"

typedef double db ;
using namespace std;
#define all(x) begin(x), end(x)
#define pb push_back
#define int long long
#define doub(k) printf("%.1lf\n", k) // setprecision(5)
typedef pair<int ,int > pll;typedef map<int , int > mll;typedef vector<int > vll;typedef vector<pll>vpll;
typedef set<int > sll;
const int nx[4] = {0, 0, 1, -1}, ny[4] = {1, -1, 0, 0};
const int dr[8] = {1,1,0,-1,-1,-1, 0, 1}, dc[8] = {0,1,1, 1, 0,-1,-1,-1};
int a[10000];
int Secret(int X, int Y){

}
void Init(int N, int A[]){
   for(int i=0;i<N;i++){
        a[i]=A[i];
   }
}
int Query(int L, int R){
    int r;
    r=Secret(a[L+1],a[L]);
    for(int i=L+2;i<=R;i++){
        r=Secret(r,a[i]);
    }
    return r;
}

Compilation message

secret.cpp: In function 'long long int Secret(long long int, long long int)':
secret.cpp:17:1: warning: no return statement in function returning non-void [-Wreturn-type]
   17 | }
      | ^
/usr/bin/ld: /tmp/cc1n9p0w.o: in function `main':
grader-full.cpp:(.text.startup+0x2a8): undefined reference to `Init(int, int*)'
/usr/bin/ld: grader-full.cpp:(.text.startup+0x30b): undefined reference to `Query(int, int)'
collect2: error: ld returned 1 exit status