Submission #1014163

#TimeUsernameProblemLanguageResultExecution timeMemory
101416312345678Council (JOI23_council)C++17
16 / 100
4072 ms27360 KiB
#include <bits/stdc++.h> using namespace std; const int nx=3e5+5, mx=21; int n, m, sm[mx], a[nx][mx], res[nx]; int main() { cin.tie(NULL)->sync_with_stdio(false); cin>>n>>m; for (int i=1; i<=n; i++) for (int j=1; j<=m; j++) cin>>a[i][j], sm[j]+=a[i][j]; for (int i=1; i<=n; i++) { for (int j=i+1; j<=n; j++) { int tmp=0; for (int k=1; k<=m; k++) tmp+=((sm[k]-a[i][k]-a[j][k])>=(n/2)); res[i]=max(res[i], tmp); res[j]=max(res[j], tmp); } } for (int i=1; i<=n;i ++) cout<<res[i]<<'\n'; }
#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...