| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1334724 | zhehan | Council (JOI23_council) | C++20 | 4093 ms | 16600 KiB |
#include <bits/stdc++.h>
using namespace std;
signed main() {
int n, m;
cin >> n >> m;
vector<vector<int>> votes(n, vector<int>(m, 0));
for (int i = 0; i < n; ++i) {
for (int j = 0; j < m; ++j) {
cin >> votes[i][j];
}
}
vector<int> sum(m, 0);
for (int i = 0; i < m; ++i) {
for (int j = 0; j < n; ++j) {
sum[i] += votes[j][i];
}
}
for (int i = 0; i < n; ++i) {
int maxpass = 0;
auto temp = sum;
for (int j = 0; j < m; ++j) {
temp[j] -= votes[i][j];
}
for (int j = 0; j < n; ++j) {
auto t = temp;
if (j != i) {
for (int k = 0; k < m; ++k) {
t[k] -= votes[j][k];
}
int passed = 0;
for (int k = 0; k < m; ++k) {
if (t[k] * 2 > n - 2) {
passed++;
}
}
maxpass = max(maxpass, passed);
}
}
cout << maxpass << '\n';
}
}| # | 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... | ||||
