# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1016608 | bozho | Wall (IOI14_wall) | C++14 | 0 ms | 0 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 endl '\n'
using namespace std;
void buildWall(int n, int k, int op[], int l[], int r[], int h[], int fh[])
{
for(int i=0;i<n;i++)
fh[i]=0;
for(int i=0;i<k;i++)
{
for(int j=l[i];j<=r[i];j++)
{
if(op[i]==1)
fh[i]=max(fh[i],h[i]);
else
fh[i]=min(fh[i],h[i]);
}
}
}