Submission #1016571

# Submission time Handle Problem Language Result Execution time Memory
1016571 2024-07-08T08:21:37 Z n3rm1n Wall (IOI14_wall) C++17
8 / 100
93 ms 14012 KB
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
const int MAXN = 1e5 + 10;
int nn, kk;
int lazy_max[4 * MAXN], lazy_min[4 * MAXN];
int add[MAXN], rem[MAXN];
int ql, qr, h;

/*void update_maxx(int i, int l, int r)
{
    if(ql <= l && r <= qr)
    {
        if(lazy_max[i] == -1)lazy_max[i] = h;
        else lazy_max[i] = max(lazy_max[i], h);
        return;
    }
    if(ql > r || qr < l)
        return;
    int mid = (l + r)/2;
    update_maxx(2*i, l, mid);
    update_maxx(2*i+1, mid+1, r);
}*/

void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[])
{
    if(n <= 10000)
    {
        for (int i = 0; i < k; ++ i)
        {

            for (int j = left[i]; j <= right[i]; ++ j)
            {
                if(op[i] == 1)finalHeight[j] = max(finalHeight[j], height[i]);
                else finalHeight[j] = min(finalHeight[j], height[i]);
            }
        }
        return;
    }

}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 13 ms 648 KB Output is correct
5 Correct 14 ms 604 KB Output is correct
6 Correct 14 ms 604 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 80 ms 8268 KB Output is correct
3 Incorrect 42 ms 3668 KB Output isn't correct
4 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 16 ms 644 KB Output is correct
5 Correct 13 ms 600 KB Output is correct
6 Correct 14 ms 604 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 93 ms 13848 KB Output is correct
9 Incorrect 42 ms 7572 KB Output isn't correct
10 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 13 ms 452 KB Output is correct
5 Correct 14 ms 604 KB Output is correct
6 Correct 13 ms 640 KB Output is correct
7 Correct 0 ms 444 KB Output is correct
8 Correct 86 ms 14012 KB Output is correct
9 Incorrect 49 ms 7504 KB Output isn't correct
10 Halted 0 ms 0 KB -