mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-05-10 08:10:27 +08:00
36 lines
544 B
C++
36 lines
544 B
C++
#include <bits/stdc++.h>
|
|
#define int long long
|
|
using namespace std;
|
|
|
|
const int MAXN = 20;
|
|
int n;
|
|
int arr[MAXN][MAXN];
|
|
int mn;
|
|
void f()
|
|
{
|
|
mn = INT_MAX;
|
|
for (int i = 0; i < n; i++)
|
|
{
|
|
int cnt = 0;
|
|
for (int j = 0; j < n; j++)
|
|
{
|
|
cnt += arr[j][i];
|
|
}
|
|
mn = min(mn, cnt);
|
|
}
|
|
}
|
|
|
|
signed main()
|
|
{
|
|
cin >> n;
|
|
for (int i = 0; i < n; i++)
|
|
{
|
|
for (int j = 0; j < n; j++)
|
|
{
|
|
cin >> arr[i][j];
|
|
}
|
|
}
|
|
f();
|
|
cout << mn << endl;
|
|
return 0;
|
|
} |