• + 1 comment

    include

    include

    include

    include

    struct line { long m,c; }; struct query { long l,r,x,y; }; int check(long,long,long,long,struct line []); int main() { int test,querysize; scanf("%d",&test); struct line l[test]; for(int i=0;i

    for(int i=0;i<querysize;i++)
    { int flag=check(q[i].l,q[i].r,q[i].x,q[i].y,l);
        if(flag==0)
            printf("YES\n");
        else
            printf("NO\n");
    }
    return 0;
    

    } int check(long l,long r,long x,long y,struct line p[]) {

    for(long i=l-1;i<=r-1;i++)
    { long e= y-((p[i].m)*x)-(p[i].c);
    
        if(e<0)
            return 0;
    
    }
    return 1;
    

    }