#include <iostream>
#include <complex>
std::pair< std::complex<double>, std::complex<double> > Quad(double a, double b, double c)
{
std::complex<double> d = b*b - 4*a*c;
return { (-b+std::sqrt(d))/(2*a), (-b-std::sqrt(d))/(2*a) };
}
int main()
{
double x = 10;
double y = -1;
double z = 1;
std::cout << "The solutions are: " << Quad(x,y,z).first << " and " << Quad(x,y,z).second << '\n';
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y29tcGxleD4KCnN0ZDo6cGFpcjwgc3RkOjpjb21wbGV4PGRvdWJsZT4sIHN0ZDo6Y29tcGxleDxkb3VibGU+ID4gUXVhZChkb3VibGUgYSwgZG91YmxlIGIsIGRvdWJsZSBjKQp7CiAgICBzdGQ6OmNvbXBsZXg8ZG91YmxlPiBkID0gYipiIC0gNCphKmM7CiAgICByZXR1cm4geyAoLWIrc3RkOjpzcXJ0KGQpKS8oMiphKSwgKC1iLXN0ZDo6c3FydChkKSkvKDIqYSkgfTsKfQoKaW50IG1haW4oKQp7CiAgICBkb3VibGUgeCA9IDEwOwogICAgZG91YmxlIHkgPSAtMTsKICAgIGRvdWJsZSB6ID0gMTsKICAgIHN0ZDo6Y291dCA8PCAiVGhlIHNvbHV0aW9ucyBhcmU6ICIgPDwgUXVhZCh4LHkseikuZmlyc3QgPDwgIiBhbmQgIiA8PCBRdWFkKHgseSx6KS5zZWNvbmQgPDwgJ1xuJzsKfQo=