The secret recipe(JUNE COOK OFF).. problem code-SECRECP

LINK TO THE PROBLEM- https://www.codechef.com/COOK107B/problems/SECRECP

this is my code and I cannot figure out what I am doing wrong…help would be appreciated.

#include <bits/stdc++.h>
using namespace std;

double min(double a,double b)
{
if (a>b) return b;
else return a;
}

int main() {
double t,n,l,Vchef;
cin >> t;
while(t–)
{
cin >> n >> l >> Vchef;
vector x(n),v(n);
for (int i=0;i<n;i++)
cin >> x[i];
for (int i=0;i<n;i++)
cin >> v[i];

	double result=numeric_limits<double>::infinity();
	
	for(int i=0;i<n;i++)
    {
        if(v[i]<=Vchef) continue;
        double ds=min(x[i],l-x[i]);
        result=min(result,ds/(v[i]-Vchef));
    }
	
	for (int i=0;i<n;i++)
	{
	    for (int j=0;j<n;j++)
	    {
	        if(i==j) continue;
	        //double rr=min(x[j],l-x[j]);
	        result=min(result,(x[i]+l-x[j])/(v[i]+v[j]));
	    }
	}
	cout <<  result << endl;
}
return 0;

}