Submission #950025

# Submission time Handle Problem Language Result Execution time Memory
950025 2024-03-20T03:42:10 Z TrinhKhanhDung Wall (IOI14_wall) C++14
8 / 100
3000 ms 18152 KB
#include <bits/stdc++.h>
#include "wall.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++){
		for(int j=left[i]; j<=right[i]; j++){
			if(op[i] == 1){
				finalHeight[j] = max(finalHeight[j], height[i]);
			}
			else{
				finalHeight[j] = min(finalHeight[j], height[i]);
			}
		}
	}
}

// const int MAX_N = 2e6 + 10;
// const int MAX_K = 5e5 + 10;

// int op[MAX_K], Left[MAX_K], Right[MAX_K], height[MAX_K], finalHeight[MAX_N];

// int main(){
// 	ios_base::sync_with_stdio(0); cin.tie(0);

// 	int n, k;
// 	cin >> n >> k;

// 	for(int i=0; i<k; i++){
// 		cin >> op[i] >> Left[i] >> Right[i] >> height[i];
// 	}

// 	buildWall(n, k, op, Left, Right, height, finalHeight);
// 	for(int i=0; i<n; i++){
// 		cout << finalHeight[i] << ' ';
// 	}

// 	return 0;
// }
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 15 ms 604 KB Output is correct
5 Correct 15 ms 636 KB Output is correct
6 Correct 15 ms 600 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 127 ms 14480 KB Output is correct
3 Correct 1102 ms 6276 KB Output is correct
4 Execution timed out 3010 ms 18136 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 2 ms 464 KB Output is correct
3 Correct 2 ms 348 KB Output is correct
4 Correct 18 ms 604 KB Output is correct
5 Correct 15 ms 600 KB Output is correct
6 Correct 15 ms 604 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 112 ms 13872 KB Output is correct
9 Correct 1108 ms 7584 KB Output is correct
10 Execution timed out 3064 ms 18008 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 452 KB Output is correct
3 Correct 1 ms 344 KB Output is correct
4 Correct 15 ms 600 KB Output is correct
5 Correct 19 ms 604 KB Output is correct
6 Correct 18 ms 448 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 110 ms 14012 KB Output is correct
9 Correct 1142 ms 7576 KB Output is correct
10 Execution timed out 3041 ms 18152 KB Time limit exceeded
11 Halted 0 ms 0 KB -