Submission #487173

#TimeUsernameProblemLanguageResultExecution timeMemory
487173AnasBenMoussaSecret (JOI14_secret)C++14
Compilation error
0 ms0 KiB
#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 Secret(int X, int Y){ } void Init(int N, int A[]){ } 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 (stderr)

secret.cpp: In function 'long long int Secret(long long int, long long int)':
secret.cpp:16:1: warning: no return statement in function returning non-void [-Wreturn-type]
   16 | }
      | ^
secret.cpp: In function 'long long int Query(long long int, long long int)':
secret.cpp:22:14: error: 'A' was not declared in this scope
   22 |     r=Secret(A[L+1],A[L]);
      |              ^
secret.cpp:24:11: error: 'Sercret' was not declared in this scope; did you mean 'Secret'?
   24 |         r=Sercret(A[i],A[i-1]);
      |           ^~~~~~~
      |           Secret