# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1167010 | anmattroi | Council (JOI23_council) | C++17 | 250 ms | 31560 KiB |
#include <bits/stdc++.h>
#define maxn 300005
#define maxm 25
#define fi first
#define se second
using namespace std;
using ii = pair<int, int>;
int n, m;
int a[maxn][maxm];
namespace sub1 {
int cnt[maxm];
void mainProgram() {
int pivot = n/2;
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++) cnt[j] += a[i][j];
for (int i1 = 1; i1 <= n; i1++) {
int ans = 0;
for (int j = 1; j <= m; j++) cnt[j] -= a[i1][j];
for (int i2 = 1; i2 <= n; i2++) {
if (i2 == i1) continue;
for (int j = 1; j <= m; j++) cnt[j] -= a[i2][j];
int ds = 0;
for (int j = 1; j <= m; j++) ds += (cnt[j] >= pivot);
ans = max(ans, ds);
for (int j = 1; j <= m; j++) cnt[j] += a[i2][j];
}
cout << ans << "\n";
for (int j = 1; j <= m; j++) cnt[j] += a[i1][j];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |