Submission #446797

# Submission time Handle Problem Language Result Execution time Memory
446797 2021-07-23T09:53:10 Z Valaki2 Colouring a rectangle (eJOI19_colouring) C++14
10 / 100
63 ms 7652 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long

int n, m;

void solve_n_1() {
    vector<ll> a(n + m - 1, 0);
    vector<ll> b(n + m - 1, 0);
    for(ll &x : a) cin >> x;
    for(ll &x : b) cin >> x;
    reverse(b.begin(), b.end());
    ll ans = 0;
    for(ll i = 0; i < n + m - 1; ++i) ans += min(a[i], b[i]);
    cout << ans << "\n";
}

void solve_bf_1010() {
    
}

void solve() {
    cin >> n >> m;
    if(n == 1) {
        solve_n_1();
        return;
    }
    if(n <= 20 && m <= 20) {
        solve_bf_1010();
        return;
    }
    
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    solve();
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 52 ms 7276 KB Output is correct
2 Correct 52 ms 7272 KB Output is correct
3 Correct 52 ms 7276 KB Output is correct
4 Correct 55 ms 7556 KB Output is correct
5 Correct 63 ms 7652 KB Output is correct
6 Correct 50 ms 6628 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 332 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -