# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
136855 |
2019-07-26T11:13:49 Z |
reda |
Wall (IOI14_wall) |
C++14 |
|
3000 ms |
18148 KB |
#include<bits/stdc++.h>
//#include"grader.h"
using namespace std ;
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 l=left[i],r=right[i];
int h=height[i];
if(op[i]==1)
{
for(int j=l;j<=r;j++)
{
if(finalHeight[j]<h)
{
finalHeight[j]+=h-finalHeight[j];
}
}
}
else
{
for(int j=l;j<=r;j++)
{
if(finalHeight[j]>h)
{
finalHeight[j]-=-h+finalHeight[j];
}
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
256 KB |
Output is correct |
2 |
Correct |
4 ms |
504 KB |
Output is correct |
3 |
Correct |
3 ms |
376 KB |
Output is correct |
4 |
Correct |
17 ms |
632 KB |
Output is correct |
5 |
Correct |
14 ms |
632 KB |
Output is correct |
6 |
Correct |
14 ms |
504 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
256 KB |
Output is correct |
2 |
Correct |
174 ms |
13972 KB |
Output is correct |
3 |
Correct |
1246 ms |
7484 KB |
Output is correct |
4 |
Execution timed out |
3019 ms |
18128 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
256 KB |
Output is correct |
2 |
Correct |
4 ms |
504 KB |
Output is correct |
3 |
Correct |
3 ms |
376 KB |
Output is correct |
4 |
Correct |
15 ms |
560 KB |
Output is correct |
5 |
Correct |
14 ms |
604 KB |
Output is correct |
6 |
Correct |
14 ms |
504 KB |
Output is correct |
7 |
Correct |
2 ms |
256 KB |
Output is correct |
8 |
Correct |
175 ms |
14044 KB |
Output is correct |
9 |
Correct |
1238 ms |
7472 KB |
Output is correct |
10 |
Execution timed out |
3020 ms |
18144 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
4 ms |
504 KB |
Output is correct |
3 |
Correct |
3 ms |
376 KB |
Output is correct |
4 |
Correct |
17 ms |
504 KB |
Output is correct |
5 |
Correct |
14 ms |
504 KB |
Output is correct |
6 |
Correct |
14 ms |
504 KB |
Output is correct |
7 |
Correct |
2 ms |
376 KB |
Output is correct |
8 |
Correct |
174 ms |
13944 KB |
Output is correct |
9 |
Correct |
1295 ms |
7472 KB |
Output is correct |
10 |
Execution timed out |
3098 ms |
18148 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |