# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
423114 |
2021-06-10T17:48:28 Z |
daanolav |
Wall (IOI14_wall) |
C++14 |
|
3000 ms |
8080 KB |
#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) != (height[phaseNum] < res)) {
res = height[phaseNum];
}
}
}
finalHeight[colNum] = res;
}
return;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
332 KB |
Output is correct |
3 |
Correct |
3 ms |
204 KB |
Output is correct |
4 |
Correct |
202 ms |
388 KB |
Output is correct |
5 |
Correct |
70 ms |
384 KB |
Output is correct |
6 |
Correct |
70 ms |
332 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
164 ms |
8080 KB |
Output is correct |
3 |
Execution timed out |
3052 ms |
3556 KB |
Time limit exceeded |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
332 KB |
Output is correct |
3 |
Correct |
3 ms |
204 KB |
Output is correct |
4 |
Correct |
205 ms |
380 KB |
Output is correct |
5 |
Correct |
84 ms |
380 KB |
Output is correct |
6 |
Correct |
70 ms |
332 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
150 ms |
8068 KB |
Output is correct |
9 |
Execution timed out |
3062 ms |
3580 KB |
Time limit exceeded |
10 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
2 ms |
332 KB |
Output is correct |
3 |
Correct |
4 ms |
204 KB |
Output is correct |
4 |
Correct |
216 ms |
376 KB |
Output is correct |
5 |
Correct |
70 ms |
368 KB |
Output is correct |
6 |
Correct |
72 ms |
332 KB |
Output is correct |
7 |
Correct |
0 ms |
204 KB |
Output is correct |
8 |
Correct |
151 ms |
8016 KB |
Output is correct |
9 |
Execution timed out |
3050 ms |
3652 KB |
Time limit exceeded |
10 |
Halted |
0 ms |
0 KB |
- |