# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|
284147 | | Ozy | Wall (IOI14_wall) | C++17 | | 3064 ms | 18172 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "wall.h"
#include <bits/stdc++.h>
#define lli long long int
#define rep(i,a,b) for (lli i = (a); i <= (b); i++)
#define MIN -100001
using namespace std;
struct x{
lli pos;
lli tipo;
lli val;
bool operator < (const x &a)
const {
return pos < a.pos;
}
};
set<lli> set1,set2;
vector<x> sum,res;
lli cant1[100002],cant2[100002];
lli cont1,cont2,a,b;
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
rep(i,0,k-1) {
if (op[i] == 1) {
rep(j,left[i],right[i]) if (finalHeight[j] < height[i]) finalHeight[j] = height[i];
}
else {
rep(j,left[i],right[i]) if (finalHeight[j] > height[i]) finalHeight[j] = height[i];
}
}
return;
}
# | 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... |