#include <bits/stdc++.h>
using namespace std;
const int N = 2e5+5;
struct node{
int x,y,z;
}a[N];
int n;
bool check(double mid){
double time=0.0;
for(int i=1; i<=n; i++){
time+=a[i].z/mid;
if(time>a[i].y)return false;
if(time<a[i].x)time=a[i].x;
}
return true;
}
int main(){
cin>>n;
for(int i=1; i<=n; i++){
cin>>a[i].x>>a[i].y>>a[i].z;
}
double l=0.0,r=1e9,ans;
while(r-l>=1e-10){
double mid=(l+r)/2.0;
if(check(mid)){
r=mid;
}else{
l=mid;
}
}
printf("%0.2lf",l);
return 0;
}
TLE #7 #10
后来变量改为long double
都输出0.00