Submission #145015

# Submission time Handle Problem Language Result Execution time Memory
145015 2019-08-18T12:27:35 Z MKopchev popa (BOI18_popa) C++14
37 / 100
258 ms 504 KB
#include<bits/stdc++.h>
#include<popa.h>
using namespace std;
/*
int query(int a,int b,int c,int d)
{

}
*/
int solve(int l,int r,int* Left,int* Right)
{
    if(l==r)
    {
        Left[l]=-1;
        Right[l]=-1;
        return l;
    }
    if(l>r)return -1;

    for(int i=l;i<=r;i++)
        if(query(l,r,i,i))
        {
            Left[i]=solve(l,i-1,Left,Right);
            Right[i]=solve(i+1,r,Left,Right);
            return i;
        }
}
int solve(int N, int* Left, int* Right)
{
    return solve(0,N-1,Left,Right);
}

Compilation message

popa.cpp: In function 'int solve(int, int, int*, int*)':
popa.cpp:27:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# Verdict Execution time Memory Grader output
1 Correct 61 ms 316 KB Output is correct
2 Correct 110 ms 248 KB Output is correct
3 Correct 13 ms 248 KB Output is correct
4 Correct 61 ms 504 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 258 ms 444 KB too many querie
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 30 ms 248 KB too many querie
2 Halted 0 ms 0 KB -