# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
135167 |
2019-07-23T17:46:52 Z |
arthurconmy |
Wall (IOI14_wall) |
C++14 |
|
170 ms |
13944 KB |
#include <bits/stdc++.h>
#ifndef ARTHUR_LOCAL
#include "wall.h"
#endif
using namespace std;
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[])
{
for(int i=0; i<k; i++)
{
if(op[i]==1) // adding
{
for(int j=left[i]; j<=right[i]; j++)
{
finalHeight[j] = max(finalHeight[j],height[j]);
}
}
else
{
for(int j=left[i]; j<=right[i]; j++)
{
finalHeight[j] = min(finalHeight[j],height[j]);
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Incorrect |
4 ms |
504 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
504 KB |
Output is correct |
2 |
Incorrect |
170 ms |
13944 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
256 KB |
Output is correct |
2 |
Incorrect |
4 ms |
504 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
504 KB |
Output is correct |
2 |
Incorrect |
4 ms |
376 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |