Submission #423113

#TimeUsernameProblemLanguageResultExecution timeMemory
423113daanolavWall (IOI14_wall)C++14
8 / 100
3084 ms13892 KiB
#include "wall.h" using namespace std; int colNum, phaseNum,res; void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){ for(colNum = 0; colNum < n; ++colNum) { res = 0; for(phaseNum = 0; phaseNum < k; ++phaseNum) { if(left[phaseNum] <= colNum && right[phaseNum] >= colNum) { if(op[phaseNum] == 1) { if(height[phaseNum] > res) { res = height[phaseNum]; } } else { if(height[phaseNum] < res) { res = height[phaseNum]; } } } } finalHeight[colNum] = res; } 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...