# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1098663 |
2024-10-09T16:24:33 Z |
vjudge1 |
Wall (IOI14_wall) |
C++17 |
|
124 ms |
13956 KB |
void buildWall(int n, int k, int op[], int left[], int right[],int height[], int finalHeight[]){
long long int dp[n+5];
for(int i=0;i<=n+1;i++)dp[i]=0;
for(int i=0;i<k;i++){
if(op[i]==1){
dp[left[i]]+=1LL*height[i],dp[right[i]+1]-=1LL*height[i];
}else{
dp[left[i]]-=1LL*height[i],dp[right[i]+1]+=1LL*height[i];
}
}long long int cur = 0;
for(int i=0;i<n;i++){
cur+=dp[i];
finalHeight[i]=cur;
}return;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 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 |
124 ms |
13956 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 |
1 ms |
348 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 |
436 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |