Submission #414618

#TimeUsernameProblemLanguageResultExecution timeMemory
414618LouayFarahWall (IOI14_wall)C++14
8 / 100
3074 ms18116 KiB
#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<n; i++) finalHeight[i] = 0; int c, l, r, h; for(int q = 0; q<k; q++) { c = op[q]; l = left[q]; r = right[q]; h = height[q]; for(int i = l; i<=r; i++) { if(c==1) { if(finalHeight[i]<h) finalHeight[i] = h; } else { if(finalHeight[i]>h) finalHeight[i] = h; } } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...