#include
using namespace std;
const double _inpArrMakenum(const bool mtag, const double integer, const int demical)
{
double _d = 0;
for(int _cpd = demical; _cpd; _cpd /= 10)
_d = (_d + double(_cpd % 10)) / 10.;
return mtag? -integer-_d : integer+_d;
}
double* input_array(int *arrLen=NULL)
{
vector v;
pair n = make_pair(0, 0);
bool mtag = false,ftag = false,ntag = false;
while(true)
{
int c = getchar();
if(c == '-')
{
if(ntag)
{
v.push_back(_inpArrMakenum(mtag, n.first, n.second));
n = make_pair(0, 0);mtag = ftag = ntag = false;
}
else
mtag = ntag = true;
}
else if(c == '.')
{
if(ftag)
{
v.push_back(_inpArrMakenum(mtag, n.first, n.second));
n = make_pair(0, 0);mtag = ftag = ntag = false;
}
else
ftag = ntag = true;
}
else if(c >= '0'&&c <= '9')
{
if(!ftag)
n.first *= 10,n.first += c-'0';
else if(n.second < 100000)
n.second *= 10,n.second += c-'0';
ntag = true;
}
else if(ntag)
{
v.push_back(_inpArrMakenum(mtag, n.first, n.second));
n = make_pair(0,0);mtag = ftag = ntag = false;
if(c == '\n')break;
}
}
int len = v.size();
double* array = new double[len];
for(int i = 0; i < len; i++)
array[i] = (double)v[i];
if(arrLen!=NULL)*arrLen=len;
return array;
}
int main()
{
int len;
double *a=input_array(&len);
for(int i=0;i
printf("%lf ",a[i]);
return 0;
}