# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
944822 |
2024-03-13T06:09:22 Z |
ezzzay |
Wall (IOI14_wall) |
C++14 |
|
112 ms |
22304 KB |
#include "wall.h"
#include<bits/stdc++.h>
int max(int a, int b){
if(a>b)return a;
return b;
}
int min(int a, int b){
if(a<b)return a;
return b;
}
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
for(int i=0;i<k;i++){
int c=op[i];
int l=left[i],r=right[i];
int h=height[i];
if(c==1){
for(int j=l;j<=r;j++){
finalHeight[i]=max(finalHeight[i],h);
}
}
else{
for(int j=l;j<=r;j++){
finalHeight[i]=min(finalHeight[i],h);
}
}
}
return;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Incorrect |
1 ms |
568 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Runtime error |
112 ms |
22304 KB |
Execution killed with signal 11 |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
600 KB |
Output is correct |
2 |
Incorrect |
2 ms |
344 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
2 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |