#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define INF 2000000000
const int maxn = 1005;
int n,x,add[maxn],cost[maxn],posi[maxn];
double sum[maxn],v;
struct node{
int x,y,z;
bool operator < (const node& rhs) const{
return x < rhs.x;
}
}a[maxn];
double Sum(int i,int j){
return sum[j] - sum[i-1];
}
double d[maxn][maxn][2];
bool vis[maxn][maxn][2];
double dp(int i,int j,int p){
if(vis[i][j][p]) return d......
阅读全文