1940. Spatial Concepts Test

单点时限: 2.0 sec

内存限制: 256 MB

输入格式

The first line of input contains a single integer N, (1 ≤ N ≤ 1000) which is the number of datasets that follow.

Each dataset consists of six lines of input. The first line of input is the specification for the folded out cube as described above. This line is followed by five lines, each of which gives the specification of one answer image as described above.

输出格式

For each dataset, output on a single line the dataset number, (1 through N), a blank, the number of answers which are solutions of the problem (corners of the cube specified in the folded out line), a blank and five ‘Y’ or ‘N’ characters separated by a blank indicating which of the answer images was a solution (‘Y’ for a solution, ‘N’ for not a solution).

样例

Input
2
F3E4E2D3C2F3
C2D2F2
E3F3C4
F2C2D2
D1E1F3
E1C1E1
A2F4F1A3A3C4
C3A4A2
F3F4A1
F3C4A1
A2C3A2
A4A4F1
Output
1 2 Y N Y N N
2 0 N N N N N

1 人解决,1 人已尝试。

1 份提交通过,共有 1 份提交。

8.9 EMB 奖励。

创建: 16 年,8 月前.

修改: 7 年,3 月前.

最后提交: 16 年前.

来源: Greater New York 2007

题目标签