답안 #246437

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
246437 2020-07-09T09:54:40 Z proma Colouring a rectangle (eJOI19_colouring) C++17
10 / 100
74 ms 6256 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[n-i-1], 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;
         ^~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 56 ms 1920 KB Output is correct
2 Correct 58 ms 5728 KB Output is correct
3 Correct 56 ms 5624 KB Output is correct
4 Correct 74 ms 6056 KB Output is correct
5 Correct 67 ms 6256 KB Output is correct
6 Correct 55 ms 5240 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Runtime error 38 ms 3576 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 5 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -