Submission #246431

# Submission time Handle Problem Language Result Execution time Memory
246431 2020-07-09T09:43:54 Z proma Colouring a rectangle (eJOI19_colouring) C++17
0 / 100
63 ms 5880 KB
#include <bits/stdc++.h>
#define endl "\n"
#define int long long
#define see(x) cerr<<#x<<"="<<x<<endl;

using namespace std;

const int N = 2*1e5 + 10;

int m, n, a[N];

int32_t main () {
    ios_base::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);

    cin >> m >> n;

    int ans = 0;
    for (int i = 0; i < m + n - 1; ++ i)
        cin >> a[i];

    int sum = 0;
    for (int i = 0; i < m + n - 1; ++ i) {
        int b; cin >> b;
        sum += min(a[i], b);
    }

    cout << sum << endl;

    return 0;
}

Compilation message

colouring.cpp: In function 'int32_t main()':
colouring.cpp:18:9: warning: unused variable 'ans' [-Wunused-variable]
     int ans = 0;
         ^~~
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 63 ms 5784 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 35 ms 5880 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Halted 0 ms 0 KB -