이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "wall.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fore(a, b, c) for(int a=b; a<c; ++a)
#define vi vector<int>
#define pb push_back
#define ii pair<int,int>
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define dbg(x) cerr << #x << ": " << x << endl
#define raya cerr << "===============" << endl
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
fore(i, 0, k){
if(op[i] == 1){
// adding
fore(j, left[i], right[i]+1){
finalHeight[j] = max(height[i], finalHeight[j]);
}
}
else {
// removing
fore(j, left[i], right[i]+1){
finalHeight[j] = min(height[i], finalHeight[j]);
}
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |