# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
814166 | MohamedAhmed04 | Snowball (JOI21_ho_t2) | C++14 | 480 ms | 15328 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std ;
const int MAX = 2e5 + 10 ;
long long a[MAX] , b[MAX] ;
int n , q ;
long long pref[MAX] , mxpref[MAX] , mnpref[MAX] ;
bool check(int i , long long x)
{
int l = 1 , r = q ;
int idx = r+1 ;
while(l <= r)
{
int mid = (l + r) >> 1 ;
if(mxpref[mid] >= x - a[i])
idx = mid , r = mid-1 ;
else
l = mid+1 ;
}
if(idx <= q && a[i+1] + mnpref[idx] >= x)
return true ;
else
return false ;
}
int main()
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |