題目鏈接:點擊打開鏈接
#include #include #include #include #include #include #include #include using namespace std; #define inf 10000000 #define ll __int64 #define N 2005 ll a,b,c; int main(){ ll i, j; while(cin>>a>>b>>c) { double A = (double)a, B = (double)b, C = (double)c; if(a==0) { if(b==0) { if(c==0)puts("-1"); else puts("0"); continue; } puts("1"); printf("%.10lf\n", (-C)/B); continue; } ll h = b*b-4*a*c; if(h<0){puts("0");continue;} if(h==0) { puts("1"); printf("%.10lf\n",-(B/(2.0*A))); } else { puts("2"); double H = sqrt((double)h); if((-B-H)/(2.0*A) > (-B+H)/(2.0*A)) H *= -1; printf("%.10lf\n%.10lf\n", (-B-H)/(2.0*A), (-B+H)/(2.0*A)); } } return 0; }
策略模式(Strategy):定義了一系列的算法,將它
GLScene開源庫為Delphi提供了基於OpenG
M
Qt中的坐標系統,Qt坐標系統Qt使用統一的坐標系統來定位窗
hdu 2604 Queuing£¨¾ØÕóÓÅ»¯µÝÍÆ
C++中引用傳遞和指針傳遞函數參數的詳解,函數詳解先來分析指