Submission #1167010

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11670102025-03-15 03:05:02anmattroiCouncil (JOI23_council)C++17
16 / 100
250 ms31560 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];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...