提交时间:2022-07-13 22:16:11
运行 ID: 51847
#include <bits/stdc++.h> using namespace std; int n,k; int a[500][500]; unsigned long long sum[500],m=0xfffffff,dir,ans; inline int read() { int x=0; char c=getchar(); for(; c<'0' || c>'9'; c=getchar()); for(; c<='9' && c>='0'; c=getchar()) x=(x<<3)+(x<<1)+c-'0'; return x; } int main() { n=read(),k=read(); for(int i=1; i<=n; i++) { for(int j=1; j<=n; j++) { a[i][j]=read(); sum[i]+=a[i][j]; } if(sum[i]<m) { m=sum[i]; dir=i; } } cout<<(n-1)*(n-2)/2 return 0; }