Submission #464628

# Submission time Handle Problem Language Result Execution time Memory
464628 2021-08-13T14:38:33 Z ewirlan Colouring a rectangle (eJOI19_colouring) C++17
10 / 100
64 ms 6156 KB
//Colouring a rectangle

#define _CTR_SECURE_NO_WARNINGS
#include <iostream>
#include <algorithm>
typedef long long int ll;
template <typename T> T in()
{
    T x;
    std::cin >> x;
    return x;
}
constexpr int maxn = 2e5 + 3;
int minus[maxn];
int plus[maxn];
ll m1(int n)
{
    ll odp(0);
    for (int i(1); i < n; ++i)odp += std::min(minus[i], plus[n - i]);
    return odp;
}
int main()
{
    std::cin.tie(nullptr); std::cout.tie(nullptr); std::ios_base::sync_with_stdio(0);
    int m(in<int>()), n(in<int>());
    for (int i(1); i < m + n; ++i)std::cin >> minus[i];
    for (int i(1); i < m + n; ++i)std::cin >> plus[i];
    if (m == 1)std::cout << m1(n + m);
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 49 ms 1760 KB Output is correct
2 Correct 51 ms 5712 KB Output is correct
3 Correct 64 ms 5700 KB Output is correct
4 Correct 57 ms 5912 KB Output is correct
5 Correct 61 ms 6156 KB Output is correct
6 Correct 51 ms 5060 KB Output is correct
# Verdict Execution time Memory Grader output
1 Runtime error 32 ms 1980 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Output isn't correct
2 Halted 0 ms 0 KB -