Submission #438824

# Submission time Handle Problem Language Result Execution time Memory
438824 2021-06-28T17:11:23 Z fadi57 Secret (JOI14_secret) C++14
Compilation error
0 ms 0 KB
#include "secret.h"
#include "grader.cpp"
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
const int mx=1e3;
typedef long long ll;
const int mod=1e9+7;
int inf=1e9+10;
int arr[mx];
int n;
int seg[4*mx];
int merg(int x,int y){

if(x==-1){return y;}
if(y==-1){return x;}

return Secret(x,y);




}
void solve(int node,int l,int r){

         if(l==r){

            seg[node]=arr[l];
            return ;
         }
      int mid=(l+r)/2;

      solve(node*2,l,mid);solve(node*2+1,mid+1,r);
       seg[node]=merg(seg[node*2],seg[node*2+1]);
       return;

 }

 int query (int node,int l,int r,int l2,int r2){

       if(l>r2||r<l2){

        return -1;
       }

     if(l>=l2&&r<=r2){
        return arr[node];
     }
     int mid=(l+r)/2;

 return merg(query(node*2,l,mid,l2,r2),query(node*2+1,mid+1,r,l2,r2));

 }
void Init(int N, int A[]) {

    for(int i=0;i<N;i++){
        cin>>arr[i];
    }
    n=N;
 // Secret(0, 1000000000);

 solve(1,0,n-1);
}

int Query(int L, int R) {
  return query(1,0,n-1,L,R);
}

Compilation message

secret.cpp:2:10: fatal error: grader.cpp: No such file or directory
    2 | #include "grader.cpp"
      |          ^~~~~~~~~~~~
compilation terminated.