int n;
int ind[50005];
int l;
void init(int N, int L, int X[])
{
for(int i=0;i<N;i++)
ind[i]=X[i];
l=L;
n=N;
}
int update(int i, int y)
{
ind[i]=y;
int cnt=1;
int last=ind[0];
for(int i=1;i<n;i++)
{
if(last+l<ind[i])
{
cnt++;
last=ind[i];
}
}
return cnt;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
248 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
248 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
248 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
248 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
2 ms |
248 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |