Submission #696170

# Submission time Handle Problem Language Result Execution time Memory
696170 2023-02-05T17:21:38 Z amirhoseinfar1385 Measures (CEOI22_measures) C++17
0 / 100
117 ms 2072 KB
#include<bits/stdc++.h>
using namespace std;

int main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	int n,m,d;
	cin>>n>>m>>d;
	if(n>0){
		cout<<"tof"<<endl;
		return 0;
	}
	vector<int>allm(m);
	for(int i=0;i<m;i++){
		cin>>allm[i];
	}
	sort(allm.begin(),allm.end());
	long double res=0;
	long double last=allm[0];
	cout<<setprecision(30)<<res<<" ";
	for(int i=1;i<m;i++){
		long double dp=last+d;
		if(dp>allm[i]){
			if(abs(dp-allm[i])>res){
				long double fz=abs(dp-allm[i])-res;
				res+=fz/2;
				last=allm[i]+res;
			}
		}
		else{
			last=max(dp,allm[i]-res);
		}
		cout<<res<<" ";
	}
	cout<<"\n";
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 117 ms 2072 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 117 ms 2072 KB Output isn't correct
2 Halted 0 ms 0 KB -