Submission #135169

# Submission time Handle Problem Language Result Execution time Memory
135169 2019-07-23T17:50:52 Z arthurconmy Wall (IOI14_wall) C++14
8 / 100
3000 ms 18236 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[i]);
			}
		}
 
		else
		{
			for(int j=left[i]; j<=right[i]; j++)
			{
				finalHeight[j] = min(finalHeight[j],height[i]);
			}
		}
	}
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 4 ms 376 KB Output is correct
3 Correct 3 ms 380 KB Output is correct
4 Correct 20 ms 632 KB Output is correct
5 Correct 20 ms 632 KB Output is correct
6 Correct 20 ms 504 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 168 ms 8312 KB Output is correct
3 Correct 1233 ms 7476 KB Output is correct
4 Execution timed out 3023 ms 18236 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 4 ms 376 KB Output is correct
3 Correct 3 ms 376 KB Output is correct
4 Correct 20 ms 504 KB Output is correct
5 Correct 20 ms 504 KB Output is correct
6 Correct 21 ms 632 KB Output is correct
7 Correct 2 ms 256 KB Output is correct
8 Correct 170 ms 13964 KB Output is correct
9 Correct 1232 ms 7608 KB Output is correct
10 Execution timed out 3038 ms 18212 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 4 ms 376 KB Output is correct
3 Correct 3 ms 376 KB Output is correct
4 Correct 20 ms 504 KB Output is correct
5 Correct 20 ms 596 KB Output is correct
6 Correct 20 ms 632 KB Output is correct
7 Correct 2 ms 256 KB Output is correct
8 Correct 169 ms 13948 KB Output is correct
9 Correct 1237 ms 7472 KB Output is correct
10 Execution timed out 3060 ms 18168 KB Time limit exceeded
11 Halted 0 ms 0 KB -