Sort by

recency

|

46 Discussions

|

  • + 0 comments

    My javascript solution (two liner, could easily be one):

    function main() {
        const points = Array(+readLine()).fill().map(_ => readLine().split(' ').map(x => +x));
        console.log([0, 1].some(x => points.every((y, _, arr) => y[x] == arr[0][x])) ? 'YES' : 'NO');
    }
    
  • + 1 comment

    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"); } }

  • + 0 comments
    x = []
    y = []
    n = int(input())
    for i in range(n):
        xy = input().split()
        x.append(xy[0])
        y.append(xy[1])
    print ("YES" if (len(set(x)) == 1 or len(set(y)) == 1 ) else "NO")
    
  • + 0 comments
    import math
    import os
    import random
    import re
    import sys
    
    def line(arr_x,arr_y):
        if len(set(arr_x)) == 1:
            return "YES"
        elif len(set(arr_y)) == 1:
            return "YES"
        else:
            return "NO"
        
    if __name__ == '__main__':
        n = int(input())
        arr_x = []
        arr_y = []
        for n_itr in range(n):
            xy = input().split()
            x = int(xy[0])
            y = int(xy[1])
            arr_x.append(x)
            arr_y.append(y)
        print(line(arr_x,arr_y))
    
  • + 0 comments

    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.