Submission #1192390

#TimeUsernameProblemLanguageResultExecution timeMemory
1192390lance0Wall (IOI14_wall)C++20
8 / 100
72 ms8076 KiB
#include <bits/stdc++.h>
using namespace std;

void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]) {
	if (n <= 10000 and k <= 5000) {
		//subtask 1
		for (int i = 0; i < k; i++) {
			for (int j = left[i]; j <= right[i]; j++) {
				if (op[i] == 1) {
					finalHeight[j] = max(height[i],finalHeight[j]);
				} else {
					finalHeight[j] = min(height[i],finalHeight[j]);
				}
			}
		}
	}
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...