Submission #487174

# Submission time Handle Problem Language Result Execution time Memory
487174 2021-11-14T18:57:41 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=Sercret(A[i],A[i-1]);
    }
    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 | }
      | ^
secret.cpp: In function 'long long int Query(long long int, long long int)':
secret.cpp:25:14: error: 'A' was not declared in this scope
   25 |     r=Secret(A[L+1],A[L]);
      |              ^
secret.cpp:27:11: error: 'Sercret' was not declared in this scope; did you mean 'Secret'?
   27 |         r=Sercret(A[i],A[i-1]);
      |           ^~~~~~~
      |           Secret