| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 744579 | vjudge1 | 벽 (IOI14_wall) | C++11 | 3061 ms | 18124 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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;
}*/
컴파일 시 표준 에러 (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... | ||||
