Submission #1006275

#TimeUsernameProblemLanguageResultExecution timeMemory
1006275jer033Wall (IOI14_wall)C++17
0 / 100
3072 ms8532 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] = height[i]; for (int oper = 0; oper<k; oper++) { int typ = op[oper]; int l = left[oper]; int r = right[oper]; int h = height[oper]; for (int i=l; i<=r; i++) { if (typ==1) finalHeight[i] = max(finalHeight[i], h); else finalHeight[i] = min(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...