Submission #736723

# Submission time Handle Problem Language Result Execution time Memory
736723 2023-05-06T07:10:32 Z NeroZein Wall (IOI14_wall) C++17
8 / 100
3000 ms 18128 KB
#include "wall.h"
#include <bits/stdc++.h>
using namespace std; 

void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
  for (int i = 0; i < k; ++i) {
		if (op[i] == 1) { //adding phase
			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 0 ms 212 KB Output is correct
2 Correct 2 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 18 ms 468 KB Output is correct
5 Correct 19 ms 500 KB Output is correct
6 Correct 22 ms 492 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 136 ms 13900 KB Output is correct
3 Correct 1160 ms 7460 KB Output is correct
4 Execution timed out 3052 ms 18128 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 3 ms 340 KB Output is correct
3 Correct 1 ms 308 KB Output is correct
4 Correct 16 ms 512 KB Output is correct
5 Correct 20 ms 476 KB Output is correct
6 Correct 18 ms 504 KB Output is correct
7 Correct 1 ms 304 KB Output is correct
8 Correct 129 ms 13932 KB Output is correct
9 Correct 1113 ms 7400 KB Output is correct
10 Execution timed out 3050 ms 18032 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 2 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 19 ms 496 KB Output is correct
5 Correct 18 ms 468 KB Output is correct
6 Correct 18 ms 480 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 129 ms 13844 KB Output is correct
9 Correct 1149 ms 7408 KB Output is correct
10 Execution timed out 3071 ms 18124 KB Time limit exceeded
11 Halted 0 ms 0 KB -