Submission #520982

# Submission time Handle Problem Language Result Execution time Memory
520982 2022-01-31T15:13:27 Z Valaki2 Wall (IOI14_wall) C++14
8 / 100
3000 ms 8428 KB
#include "wall.h"

#include <bits/stdc++.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;
    }
    for(int i = 0; i < k; i++) {
        if(op[i] == 1) {
            for(int j = left[i]; j <= right[i]; j++) {
                finalHeight[j] = max(finalHeight[j], height[i]);
            }
        } else {
            for(int j = left[i]; j <= right[i]; j++) {
                finalHeight[j] = min(finalHeight[j], height[i]);
            }
        }
    }
}

# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 2 ms 332 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 17 ms 404 KB Output is correct
5 Correct 19 ms 396 KB Output is correct
6 Correct 19 ms 404 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 131 ms 8052 KB Output is correct
3 Correct 1150 ms 3608 KB Output is correct
4 Execution timed out 3074 ms 8428 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 2 ms 332 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 16 ms 404 KB Output is correct
5 Correct 17 ms 400 KB Output is correct
6 Correct 19 ms 404 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 130 ms 8028 KB Output is correct
9 Correct 1108 ms 3604 KB Output is correct
10 Execution timed out 3087 ms 8388 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 2 ms 332 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Correct 16 ms 404 KB Output is correct
5 Correct 19 ms 404 KB Output is correct
6 Correct 17 ms 460 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 126 ms 8068 KB Output is correct
9 Correct 1133 ms 3608 KB Output is correct
10 Execution timed out 3080 ms 8388 KB Time limit exceeded
11 Halted 0 ms 0 KB -