| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 744579 | vjudge1 | Wall (IOI14_wall) | C++11 | 3061 ms | 18124 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 <bits/stdc++.h>
#include "wall.h"
using namespace std;
const int MAX=1e5+10;
const int INF=(1<<30);
void buildWall(int n, int k, int op[], int left[], int right[],int height[], int finalHeight[])
{
memset(finalHeight,0,sizeof(finalHeight));
int niza[n];
memset(niza,0,sizeof(niza));
for(int i=0; i<k; i++)
{
int h=height[i];
if(op[i]==1)
{
for(int j=left[i]; j<=right[i]; j++)
{
if(niza[j]<h)
{
niza[j]=h;
}
}
}
else
{
for(int j=left[i]; j<=right[i]; j++)
{
if(niza[j]>h)
{
niza[j]=h;
}
}
}
}
for(int i=0; i<n; i++)
{
finalHeight[i]=niza[i];
}
return;
}
/*int main()
{
int n,k;
cin>>n>>k;
int op[k],left[k],right[k],height[k],res[n];
for(int i=0; i<k; i++)
{
cin>>op[i]>>left[i]>>right[i]>>height[i];
}
buildWall(n,k,op,left,right,height, res);
return 0;
}*/
Compilation message (stderr)
| # | 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... | ||||
