답안 #135168

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
135168 2019-07-23T17:48:16 Z arthurconmy 벽 (IOI14_wall) C++14
0 / 100
175 ms 8096 KB
#include <bits/stdc++.h>
#ifndef ARTHUR_LOCAL
	#include "wall.h"
#endif
using namespace std;

void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[])
{
	for(int i=0; i<n; i++)
	{
		finalHeight[i]=0;
	}

	for(int i=0; i<k; i++)
	{
		if(op[i]==1) // adding
		{
			for(int j=left[i]; j<=right[i]; j++)
			{
				finalHeight[j] = max(finalHeight[j],height[j]);
			}
		}

		else
		{
			for(int j=left[i]; j<=right[i]; j++)
			{
				finalHeight[j] = min(finalHeight[j],height[j]);
			}
		}
	}
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 4 ms 376 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Incorrect 175 ms 8096 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Incorrect 4 ms 380 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 256 KB Output is correct
2 Incorrect 4 ms 376 KB Output isn't correct
3 Halted 0 ms 0 KB -