# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
290258 |
2020-09-03T14:49:06 Z |
AaronNaidu |
Wall (IOI14_wall) |
C++14 |
|
3000 ms |
18312 KB |
#include <bits/stdc++.h>
using namespace std;
void buildWall(int n, int k, int op[],int left[],int right[],int heights[],int finalHeight[]) {
for (int i = 0; i < n; i++)
{
finalHeight[i] = 0;
}
for (int i = 0; i < k; i++)
{
if (op[i] == 1)
{
for (int j = left[i]; j <= right[i]; j++)
{
finalHeight[j] = max(finalHeight[j], heights[i]);
}
}
else
{
for (int j = left[i]; j <= right[i]; j++)
{
finalHeight[j] = min(finalHeight[j], heights[i]);
}
}
}
}
# |
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 |
2 ms |
384 KB |
Output is correct |
4 |
Correct |
20 ms |
572 KB |
Output is correct |
5 |
Correct |
20 ms |
640 KB |
Output is correct |
6 |
Correct |
20 ms |
768 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
256 KB |
Output is correct |
2 |
Correct |
179 ms |
14072 KB |
Output is correct |
3 |
Correct |
1297 ms |
7544 KB |
Output is correct |
4 |
Execution timed out |
3057 ms |
18312 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 |
3 ms |
384 KB |
Output is correct |
3 |
Correct |
1 ms |
384 KB |
Output is correct |
4 |
Correct |
20 ms |
640 KB |
Output is correct |
5 |
Correct |
20 ms |
640 KB |
Output is correct |
6 |
Correct |
20 ms |
640 KB |
Output is correct |
7 |
Correct |
1 ms |
256 KB |
Output is correct |
8 |
Correct |
173 ms |
14004 KB |
Output is correct |
9 |
Correct |
1294 ms |
7544 KB |
Output is correct |
10 |
Execution timed out |
3080 ms |
18168 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 |
640 KB |
Output is correct |
3 |
Correct |
2 ms |
384 KB |
Output is correct |
4 |
Correct |
20 ms |
640 KB |
Output is correct |
5 |
Correct |
20 ms |
632 KB |
Output is correct |
6 |
Correct |
20 ms |
760 KB |
Output is correct |
7 |
Correct |
1 ms |
256 KB |
Output is correct |
8 |
Correct |
187 ms |
13944 KB |
Output is correct |
9 |
Correct |
1309 ms |
7544 KB |
Output is correct |
10 |
Execution timed out |
3071 ms |
18112 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |