//#include //#include //#include #include #include #include #include #include #include #include #include #include #include #include #include #define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0) #define deg(x) cout<< #x"=" << (x) << endl; #define degg(x,y) cout<< #x"="<< (x) <<","<< #y"="<< (y) < pii; typedef pair pll; typedef priority_queue,greater > xqueue; typedef priority_queue dqueue; //typedef tree,rb_tree_tag,tree_order_statistics_node_update> x_rb; //typedef tree,rb_tree_tag,tree_order_statistics_node_update> d_rb; const ll INF=9e18; const int inf=2147483647; ll qpow(ll a,ll b,ll mod) { ll r=1; for(; b; b>>=1) { if(b&1) r=(r*a)%mod; a=(a*a)%mod; } return r; } const int N=1e5+5; void work() { int t; sca(t); while(t--) { int n; sca(n); double ans=0; while(n--) { int b; double c; sca(b); cin>>c; ans=max(ans,(1-c)/(b+1-c)); } printf("%.5f\n",ans); } } int main() { #ifdef Local freopen("1.txt","r",stdin); #endif // mm work(); return 0; }