Submission #260666

# Submission time Handle Problem Language Result Execution time Memory
260666 2020-08-10T17:05:26 Z A02 Wall (IOI14_wall) C++14
0 / 100
184 ms 22136 KB
#include "wall.h"
#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>
#include <set>

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++){
        for (int x = left[i]; x <= right[i]; x++){
            if (op[i] == 1){
                finalHeight[x] = max(finalHeight[i], height[i]);
            } else {
                finalHeight[x] = min(finalHeight[i], height[i]);
            }
        }
    }

    return;
}

# Verdict Execution time Memory Grader output
1 Correct 0 ms 256 KB Output is correct
2 Incorrect 2 ms 512 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Runtime error 184 ms 22136 KB Execution killed with signal 11 (could be triggered by violating memory limits)
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Incorrect 3 ms 512 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -