답안 #260666

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
260666 2020-08-10T17:05:26 Z A02 벽 (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;
}

# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -