Submission #260666

#TimeUsernameProblemLanguageResultExecution timeMemory
260666A02Wall (IOI14_wall)C++14
0 / 100
184 ms22136 KiB
#include "wall.h" #include <iostream> #include <vector> #include <algorithm> #include <utility> #include <set> 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; } for (int i = 0; i < k; i++){ for (int x = left[i]; x <= right[i]; x++){ if (op[i] == 1){ finalHeight[x] = max(finalHeight[i], height[i]); } else { finalHeight[x] = min(finalHeight[i], height[i]); } } } 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...