Comments
+10

No it was not accepted but it passed the pretests.

+13

Check for loop carefully There is no index i inside the loop.

Even this passed the pretests,very weak test cases.


int main() { long long int l,x,r,y,k; cin>>l>>r>>x>>y>>k; int flag=0; for(int i=x;i<=y;i++) { if(l<=x*k&&x*k<=r) //this line though :) {flag=1;break;} } if(flag) cout<<"YES\n"; else cout<<"NO\n"; }