제출 #647638

#제출 시각아이디문제언어결과실행 시간메모리
647638mosiashvililukaMeasures (CEOI22_measures)C++14
0 / 100
1563 ms3004 KiB
#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; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...