注意:暴力出奇迹
using namespace std;
#include <iostream>
#include <algorithm>
#include <iomanip>
int main ()
{
double a,b,c,d;
double y1,y2,i,j;
cin>>a>>b>>c>>d;
for(i=-100;i<=100;i=i+0.001)
{
j=i+0.001;
y1=a*i*i*i+b*i*i+c*i+d;
y2=a*j*j*j+b*j*j+c*j+d;
if(y1>=0&&y2<=0||y1<=0&&y2>=0)
{
cout<<fixed<<setprecision(2)<<(i+j)/2<<" ";
}
}
}