We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Mathematics
- Geometry
- Points On a Line
- Discussions
Points On a Line
Points On a Line
Sort by
recency
|
46 Discussions
|
Please Login in order to post a comment
My javascript solution (two liner, could easily be one):
int main() { int n,x,y,x1,y1,cx=0,cy=0,flag=0,num; scanf("%d",&n); num=n; while(n--) { if(flag==0) { scanf("%d%d",&x,&y); x1=x; y1=y; flag=1; } else if(flag==1) { scanf("%d%d",&x,&y); if(x==x1) { cx++; } else if(y==y1) { cy++; } } } if(cx==num-1 || cy==num-1) { printf("YES"); } else { printf("NO"); } }
Do you know that there are many different networks and we need to know more about how to use it? Also, try checking out this resource for understanding how to change ip address on mac and to know how to use public Internet services correctly. In addition, you need to find really good and reliable VPN services for you and you can also gain profit from this.