Submission #1205037

#TimeUsernameProblemLanguageResultExecution timeMemory
1205037andrejikusWall (IOI14_wall)C++20
8 / 100
3096 ms8520 KiB
#include <bits/stdc++.h>
#include "wall.h"
using namespace std;
typedef long long ll;
void DBG() { cerr << "]" << endl; }
template<class H, class... T> void DBG(H h, T... t) { cerr << to_string(h); if(sizeof...(t)) cerr << ", "; DBG(t...); }
#define dbg(...) cerr << "[" << #__VA_ARGS__ << "]: [", DBG(__VA_ARGS__)

const int N = 2e5 + 3;

void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]) {
    for (int i = 0; i < k; i++) {
        int l = left[i], r = right[i], h = height[i];
        for (int j = l; j <= r; j++) {
            if (op[i] == 1)
                finalHeight[j] = max(finalHeight[j], h);
            else
                finalHeight[j] = min(finalHeight[j], h);
        }
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...