#include<bits/stdc++.h>
using namespace std;
long long a,b,c,d,e,i,j,ii,jj,zx,xc,N,M,D,f[400009],pas;
int main(){
ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
cin>>N>>M>>D;a=N+M;
for(i=1; i<=a; i++){
cin>>f[i];
}
for(ii=N+1; ii<=a; ii++){
sort(f+1,f+ii+1);pas=0;
for(i=1; i<=ii; i++){
for(j=i+1; j<=ii; j++){
zx=f[i]-i*D;xc=f[j]-j*D;
pas=max(pas,zx-xc);
pas=max(pas,xc-zx);
}
}
if(pas%2==0){
cout<<pas/2<<" ";
}else{
cout<<pas/2<<".5 ";
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
28 ms |
340 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
28 ms |
340 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1563 ms |
3004 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1563 ms |
3004 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |