이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "popa.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
int N, *L, *R;
int f(int l, int r)
{
if(l>r) return -1;
if(l==r) return l;
for(int i=l; i<=r; i++)
{
if(query(l, r, i, i))
{
L[i]=f(l, i-1);
R[i]=f(i+1, r);
return i;
}
}
}
int solve(int _N, int *_L, int *_R)
{
N=_N; L=_L; R=_R;
return f(0, N-1);
}
컴파일 시 표준 에러 (stderr) 메시지
popa.cpp: In function 'int f(int, int)':
popa.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type]
24 | }
| ^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |