{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\r\n\t\u003cspan data-scayt_word\u003d\"Josephina\" data-scaytid\u003d\"8\"\u003eJosephina\u003c/span\u003e is a clever girl and addicted to Machine Learning recently. She pays much attention to a method called Linear Discriminant Analysis, which has many interesting properties.\u003c/p\u003e\r\n\u003cp\u003e\r\n\tIn order to test the algorithm\u0026#39;s efficiency, she collects many datasets. What\u0026#39;s more, each data is divided into two parts: training data and test data. She gets the parameters of the model on training data and test the model on test data.\u003c/p\u003e\r\n\u003cp\u003e\r\n\tTo her surprise, she finds each dataset\u0026#39;s test error curve is just a parabolic curve. A parabolic curve corresponds to a quadratic function. In mathematics, a quadratic function is a polynomial function of the form \u003cem\u003ef(x) \u003d ax\u003csup\u003e2\u003c/sup\u003e + \u003cspan data-scayt_word\u003d\"bx\" data-scaytid\u003d\"7\"\u003ebx\u003c/span\u003e + c\u003c/em\u003e. The quadratic will degrade to linear function if \u003cem\u003ea \u003d 0\u003c/em\u003e.\u003c/p\u003e\r\n\u003cp\u003e\r\n\t\u0026nbsp;\u003c/p\u003e\r\n\u003cdiv style\u003d\"text-align: center;\"\u003e\r\n\t\u003cimg alt\u003d\"Quadric Function\" src\u003d\"http://livearchive.onlinejudge.org/external/50/p5009.jpg\" /\u003e\u003c/div\u003e\r\n\u003cp\u003e\r\n\tIt\u0026#39;s very easy to calculate the minimal error if there is only one test error curve. However, there are several datasets, which means \u003cspan data-scayt_word\u003d\"Josephina\" data-scaytid\u003d\"4\"\u003eJosephina\u003c/span\u003e will obtain many parabolic curves. \u003cspan data-scayt_word\u003d\"Josephina\" data-scaytid\u003d\"5\"\u003eJosephina\u003c/span\u003e wants to get the tuned parameters that make the best performance on all datasets. So she should take all error curves into account, \u003cspan data-scayt_word\u003d\"i.e\" data-scaytid\u003d\"1\"\u003ei.e\u003c/span\u003e., she has to deal with many quadric functions and make a new error definition to represent the total error. Now, she focuses on the following new function\u0026#39;s minimal which related to multiple quadric functions.\u003c/p\u003e\r\n\u003cp\u003e\r\n\tThe new function \u003cem\u003eF(x)\u003c/em\u003e is defined as follow:\u003c/p\u003e\r\n\u003ccenter\u003e\r\n\t\u003cp\u003e\r\n\t\t\u003cem\u003eF(x) \u003d max(S\u003csub\u003ei\u003c/sub\u003e(x))\u003c/em\u003e, \u003ci\u003ei\u003c/i\u003e \u003d \u003cspan data-scayt_word\u003d\"1...n\" data-scaytid\u003d\"2\"\u003e1...\u003cem\u003en\u003c/em\u003e\u003c/span\u003e. The domain of \u003cem\u003ex\u003c/em\u003e is [0, 1000]. \u003cem\u003eS\u003csub\u003ei\u003c/sub\u003e(x)\u003c/em\u003e is a quadric function.\u003c/p\u003e\r\n\u003c/center\u003e\r\n\u003cp\u003e\r\n\t\u003cspan data-scayt_word\u003d\"Josephina\" data-scaytid\u003d\"6\"\u003eJosephina\u003c/span\u003e wonders the minimum of \u003cem\u003eF(x)\u003c/em\u003e. Unfortunately, it\u0026#39;s too hard for her to solve this problem. As a super programmer, can you help her?\u003c/p\u003e\r\n\u003ch4\u003e\r\n\tInput\u003c/h4\u003e\r\n\u003cp\u003e\r\n\tThe input contains multiple test cases. The first line is the number of cases \u003cem\u003eT\u003c/em\u003e (\u003cem\u003eT\u003c/em\u003e \u0026lt; 100). Each case begins with a number \u003cem\u003en\u003c/em\u003e(\u003cem\u003en\u003c/em\u003e \u0026le; 10000). Following \u003cem\u003en\u003c/em\u003e lines, each line contains three integers \u003cem\u003ea\u003c/em\u003e (0 \u0026le; \u003cem\u003ea\u003c/em\u003e \u0026le; 100), \u003cem\u003eb\u003c/em\u003e (|\u003cem\u003eb\u003c/em\u003e| \u0026le; 5000), \u003cem\u003ec\u003c/em\u003e (|\u003cem\u003ec\u003c/em\u003e| \u0026le; 5000), which mean the corresponding coefficients of a quadratic function.\u003c/p\u003e\r\n\u003ch4\u003e\r\n\tOutput\u003c/h4\u003e\r\n\u003cp\u003e\r\n\tFor each test case, output the answer in a line. Round to 4 digits after the decimal point.\u003c/p\u003e\r\n\u003ch4\u003e\r\n\tSample Input\u003c/h4\u003e\r\n\u003cpre\u003e\r\n2\r\n1\r\n2 0 0\r\n2\r\n2 0 0\r\n2 -4 2\r\n\u003c/pre\u003e\r\n\u003ch4\u003e\r\n\tSample Output\u003c/h4\u003e\r\n\u003cpre\u003e\r\n0.0000\r\n0.5000\r\n\u003c/pre\u003e"}}]}