Submission #868571

# Submission time Handle Problem Language Result Execution time Memory
868571 2023-10-31T21:54:03 Z mariaclara Fancy Fence (CEOI20_fancyfence) C++17
0 / 100
1 ms 348 KB
#include<bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef tuple<int,int,int> trio;
const int MAXN = 5e4+10;
#define pb push_back
#define f first
#define s second

int n, h[55], w[55], resp;
int main() {

    cin >> n;

    for(int i = 1; i <= n; i++)
        cin >> h[i];

    for(int i = 1; i <= n; i++)
        cin >> w[i];

    for(int i = 1; i <= n; i++) {
        for(int j = i, l = 100; j <= n; j++) {
            l = min(h[i], l);
            resp += l*(l+1)/2;
        }
    }

    cout << resp << "\n";
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 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 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 11
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 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -