Submission #309077

#TimeUsernameProblemLanguageResultExecution timeMemory
309077mohamedsobhi777Wall (IOI14_wall)C++14
8 / 100
3091 ms18168 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 j = 0 ; j < k ;++ j){
                for(int i = left[j] ; i <= right[j] ; ++ i){
                        if(op[j] == 1){
                                finalHeight[i] = max(finalHeight[i] , height[j]) ; 
                        }
                        else {
                                finalHeight[i] = min(finalHeight[i] , height[j]) ;
                        }
                }
        }
        return;
}

#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...