Submission #911126

# Submission time Handle Problem Language Result Execution time Memory
911126 2024-01-18T13:26:25 Z makrav Council (JOI23_council) C++14
0 / 100
4000 ms 18068 KB
#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 + 1) / 2) cur++;
                }
                ans = max(ans, cur);
            }
        }
        cout << ans << '\n';
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Execution timed out 4059 ms 18068 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Execution timed out 4059 ms 18068 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Execution timed out 4059 ms 18068 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Execution timed out 4059 ms 18068 KB Time limit exceeded
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -