# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1043302 |
2024-08-04T08:01:06 Z |
nisanduu |
Wall (IOI14_wall) |
C++14 |
|
817 ms |
13952 KB |
#include "wall.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
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++){
int o = op[i];
for(int j=left[i];j<=right[i];j++){
if(finalHeight[j]<height[i] && o==1) finalHeight[j] += height[i];
if(finalHeight[j]>height[i] && o==2) finalHeight[j] -= height[i];
}
}
return;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 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 |
344 KB |
Output is correct |
2 |
Correct |
70 ms |
13952 KB |
Output is correct |
3 |
Incorrect |
817 ms |
7576 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
348 KB |
Output is correct |
2 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |