Submission #414618

# Submission time Handle Problem Language Result Execution time Memory
414618 2021-05-30T18:18:44 Z LouayFarah Wall (IOI14_wall) C++14
8 / 100
3000 ms 18116 KB
#include "bits/stdc++.h"
#include "wall.h"
using namespace std;

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

    int c, l, r, h;
    for(int q = 0; q<k; q++)
    {
        c = op[q];
        l = left[q];
        r = right[q];
        h = height[q];

        for(int i = l; i<=r; i++)
        {
            if(c==1)
            {
                if(finalHeight[i]<h)
                    finalHeight[i] = h;
            }
            else
            {
                if(finalHeight[i]>h)
                    finalHeight[i] = h;
            }
        }
    }
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 3 ms 432 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 25 ms 500 KB Output is correct
5 Correct 25 ms 484 KB Output is correct
6 Correct 25 ms 496 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 292 KB Output is correct
2 Correct 159 ms 13888 KB Output is correct
3 Correct 1852 ms 7396 KB Output is correct
4 Execution timed out 3074 ms 18028 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 3 ms 332 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 26 ms 492 KB Output is correct
5 Correct 25 ms 496 KB Output is correct
6 Correct 25 ms 496 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 161 ms 13852 KB Output is correct
9 Correct 1943 ms 7452 KB Output is correct
10 Execution timed out 3052 ms 18052 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 3 ms 332 KB Output is correct
3 Correct 2 ms 332 KB Output is correct
4 Correct 25 ms 432 KB Output is correct
5 Correct 25 ms 492 KB Output is correct
6 Correct 26 ms 560 KB Output is correct
7 Correct 1 ms 204 KB Output is correct
8 Correct 164 ms 13920 KB Output is correct
9 Correct 1820 ms 7396 KB Output is correct
10 Execution timed out 3054 ms 18116 KB Time limit exceeded
11 Halted 0 ms 0 KB -