You are viewing a single comment's thread. Return to all comments →
No bro simply use the slope formula which is basically int temp = (x2-x1)%(v1-v2);
if(v1>v2) { if(sum==num||temp=0) { cout << "YES " ; } else cout << "No"; } else cout << " No";
Seems like cookies are disabled on this browser, please enable them to open this website
Number Line Jumps
You are viewing a single comment's thread. Return to all comments →
No bro simply use the slope formula which is basically int temp = (x2-x1)%(v1-v2);
if(v1>v2) { if(sum==num||temp=0) { cout << "YES " ; } else cout << "No"; } else cout << " No";