import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int T = sc.nextInt();
for(int i=0;i<T;i++){
int s = sc.nextInt();
int n = sc.nextInt();
int d = sc.nextInt();
int x = sc.nextInt();
int y = sc.nextInt();
int t0 = sc.nextInt();
int t1 = sc.nextInt();
int t2 = sc.nextInt();
int cd[] = new int[3];
while(s>0){
if(cd[0]==0){
s-=n*d;
if(s<=0){
System.out.println("NO");
break;
}
cd[0] = t0;
}
if(cd[1]==0){
s-=y;
if(s<=0){
System.out.println("YES");
break;
}
cd[1] = t1;
}
if(cd[2]==0){
s-=x;
if(s<=0){
System.out.println("YES");
break;
}
cd[2] = t2;
}
int min = Math.min(cd[0],Math.min(cd[1],cd[2]));
cd = Arrays.stream(cd).map(a->a-min).toArray();
}
}
}
}
DOTA2
最新推荐文章于 2024-08-15 10:08:25 发布