# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
260667 |
2020-08-10T17:05:56 Z |
A02 |
Wall (IOI14_wall) |
C++14 |
|
3000 ms |
18296 KB |
#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[x], height[i]);
} else {
finalHeight[x] = min(finalHeight[x], height[i]);
}
}
}
return;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
256 KB |
Output is correct |
2 |
Correct |
2 ms |
384 KB |
Output is correct |
3 |
Correct |
3 ms |
384 KB |
Output is correct |
4 |
Correct |
25 ms |
640 KB |
Output is correct |
5 |
Correct |
28 ms |
632 KB |
Output is correct |
6 |
Correct |
23 ms |
568 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
384 KB |
Output is correct |
2 |
Correct |
172 ms |
8184 KB |
Output is correct |
3 |
Correct |
1581 ms |
7544 KB |
Output is correct |
4 |
Execution timed out |
3065 ms |
18172 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
256 KB |
Output is correct |
2 |
Correct |
2 ms |
384 KB |
Output is correct |
3 |
Correct |
2 ms |
384 KB |
Output is correct |
4 |
Correct |
23 ms |
632 KB |
Output is correct |
5 |
Correct |
24 ms |
640 KB |
Output is correct |
6 |
Correct |
23 ms |
636 KB |
Output is correct |
7 |
Correct |
0 ms |
256 KB |
Output is correct |
8 |
Correct |
174 ms |
13944 KB |
Output is correct |
9 |
Correct |
1561 ms |
7544 KB |
Output is correct |
10 |
Execution timed out |
3070 ms |
18296 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
256 KB |
Output is correct |
2 |
Correct |
2 ms |
384 KB |
Output is correct |
3 |
Correct |
2 ms |
384 KB |
Output is correct |
4 |
Correct |
24 ms |
568 KB |
Output is correct |
5 |
Correct |
24 ms |
640 KB |
Output is correct |
6 |
Correct |
23 ms |
632 KB |
Output is correct |
7 |
Correct |
1 ms |
256 KB |
Output is correct |
8 |
Correct |
171 ms |
14004 KB |
Output is correct |
9 |
Correct |
1606 ms |
7512 KB |
Output is correct |
10 |
Execution timed out |
3081 ms |
18168 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |