#include #include #include #include #include #include constexpr double PI = 3.14159265358979323846; template T compute_angle(std::vector>& points) { std::vector arguments; for (auto point : points) { arguments.push_back(std::arg(point)); } T minimum_argument = *std::min_element(arguments.begin(), arguments.end()); T answer = (minimum_argument + PI) * 180.0 / PI; if (answer > 55.0) { return 0.0; } else { return answer; } } int main() { unsigned int t; std::cin >> t; for (unsigned int i = 0; i < t; i++) { std::vector> points; for (unsigned int j = 0; j < 6; j++) { double x, y; std::cin >> x >> y; std::complex point(x, y); points.push_back(point); } std::cout << std::fixed << std::setprecision(16) << compute_angle(points) << std::endl; } return EXIT_SUCCESS; }