# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
380568 | mariowong | Building Bridges (CEOI17_building) | C++14 | 276 ms | 8160 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
struct cht{
long long dpval,hgt,psum,indx;
}b;
vector <cht> v;
vector <pair<long long,long long> > now;
long long n,dp[100005],h[100005],w[100005],ps[100005],a[100005],l,r;
long long lft,rht,midd,indx;
bool cmp(cht a1,cht a2){
return ((a1.hgt < a2.hgt) || (a1.hgt == a2.hgt) && a1.dpval-a1.psum < a2.dpval-a2.psum);
}
long double m(int j,int k){
if (h[j] == h[k])
return 1e18;
return (long double)((dp[j]-ps[j]+h[j]*h[j])-(dp[k]-ps[k]+h[k]*h[k]))/(long double)(2*(h[j]-h[k]));
}
void solve(int x,int y){
if (x == y);
else
{
int mid=(x+y)/2;
solve(x,mid);
l=1; r=1; v.clear(); now.clear();
for (int i=x;i<=mid;i++){
b.dpval=dp[i]; b.hgt=h[i]; b.psum=ps[i]; b.indx=i;
v.push_back(b);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |