题解 | #KiKi判断上三角矩阵#
KiKi判断上三角矩阵
https://www.nowcoder.com/practice/9a6786c28cdb45f9b991685f867b5d08
n=int(input()) list1=[] for i in range(n): a=list(map(int,input().split())) list1.append(a) num=0 for j in range(1,n): for k in range(j): if list1[j][k]==0: num+=1 else: break if num==n*(n-1)//2: print("YES") else: print("NO")