Submission #911129

#TimeUsernameProblemLanguageResultExecution timeMemory
911129makravCouncil (JOI23_council)C++14
16 / 100
4014 ms16876 KiB
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef vector<int> vei; typedef vector<vei> vevei; #define all(a) (a).begin(), (a).end() #define sz(a) (int) a.size() #define con cout << "NO\n" #define coe cout << "YES\n"; #define str string #define pb push_back #define ff first #define sc second #define ss second #define pii pair<int, int> #define mxe max_element #define mne min_element #define stf shrink_to_fit #define f(i, l, r) for (int i = (l); i < (r); i++) #define double ld signed main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); int n, m; cin >> n >> m; vector<vector<int>> A(n, vector<int>(m, 0)); vector<int> S(m, 0); f (i, 0, n) { f (j, 0, m) { cin >> A[i][j]; S[j] += A[i][j]; } } f (i, 0, n) { int ans = 0; for (int j = 0; j < n; j++) { int cur = 0; if (j != i) { f (jj, 0, m) { if (S[jj] - A[i][jj] - A[j][jj] >= n / 2) cur++; } ans = max(ans, cur); } } cout << ans << '\n'; } return 0; }
#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...