8621: Black Hole

内存限制:255 MB 时间限制:1 S
题面:传统 评测方式:Special Judge 上传者:
提交:0 通过:0

题目描述

Equestria is a place full of friendship, magic, and mysteries. Thus, when Twilight Sparkle finds non-spherical black holes in the sky, she is curious rather than surprised.

Twilight Sparkle finds that each of the black holes is a convex regular polyhedron with nnn faces (a convex polyhedron whose nnn faces are identical regular polygons), and the length of its edges is aaa.

Every day the black hole will shrink exactly once. If a black hole shrinks, it will become the convex hull of nnn geometry centers of the original black hole's nnn faces. And whenever the black hole isn't a regular polyhedron, it will disappear forever.

Twilight Sparkle has made TTT records for the black holes she has observed. Each of the records can be described as a tuple (n,a,k)(n,a,k)(n,a,k), indicating that a convex regular polyhedron black hole with edges of length aaa and nnn faces initially has shrunk kkk times. However, naughty Rainbow Dash replaced some of the records with impossible ones. Can you find out the impossible records and calculate the final n′n'n and a′a'a after kkk times of shrinking for those possible records?

输入格式

The first line contains an integer TTT (1≤T≤100)(1\le T\le 100)(1T100), denoting the number of the records.
In the following TTT lines, each line describes a record and contains three integers n,a,kn,a,kn,a,k (1≤n≤2001\le n\le 2001n200, 1≤a≤10001\le a\le 10001a1000, 1≤k≤201\le k\le 201k20).

输出格式

For each of the records, if the record is impossible, output impossible\texttt{impossible}impossible in a single line. Otherwise, output possible\texttt{possible}possible followed by an integer n′n'n and a real number a′a'a in a single line, separated by spaces. a′a'a is considered correct if the relative or absolute error between yours and the standard solution is not greater than 10−610^{-6}106.

输入样例 复制

3
2 10 1
4 10 1
6 10 1

输出样例 复制

impossible
possible 4 3.333333333333
possible 8 7.071067811865

数据范围与提示

For the first record, it's impossible to find a convex regular polyhedron with 222 faces.
For the second record, a 444-face convex regular polyhedron is a tetrahedron. After taking all its faces' geometry centers to make a convex hull, we get a smaller tetrahedron.
For the third record, a 666-face convex regular polyhedron is a cube. After taking all its faces' geometry centers to make a convex hull, we get an octahedron, a.k.a. an 888-face convex regular polyhedron.

分类标签