当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3707:High-Dimensional Vector Correspondence

Special Judge 特殊评判
题目描述

Let < p1, p2,..., pn > and < q1, q2,..., qn > be two sequences of vectors in the m-dimensional Euclidean space. Is that possible to transform the former using a series of reflections and/or rotations so that it becomes the latter?

输入解释

The input consists of a single data set given in the format (n, m ≤ 512)


\begin{tabular}{cccc} \textit{m} & \textit{n} & & \\ \textit{p}$_{11}$ & \textit{p}$_{12}$ & $\cdots$ & \textit{p}$_{1m}$ \\ \textit{p}$_{21}$ & \textit{p}$_{22}$ & $\cdots$ & \textit{p}$_{2m}$ \\ $\vdots$ & $\vdots$ & $\ddots$ & $\vdots$ \\ \textit{p}$_{n1}$ & \textit{p}$_{n2}$ & $\cdots$ & \textit{p}$_{nm}$ \\ \textit{q}$_{11}$ & \textit{q}$_{12}$ & $\cdots$ & \textit{q}$_{1m}$ \\ \textit{q}$_{21}$ & \textit{q}$_{22}$ & $\cdots$ & \textit{q}$_{2m}$ \\ $\vdots$ & $\vdots$ & $\ddots$ & $\vdots$ \\ \textit{q}$_{n1}$ & \textit{q}$_{n2}$ & $\cdots$ & \textit{q}$_{nm}$\\ \end{tabular}

where


\begin{tabular}{c} \textit{\textbf{p}}$_i$=[\textit{p}$_{11}$\quad\textit{p}$_{12}$\quad $\cdots$\quad\textit{p}$_{1m}$]\textsuperscript{T} \\ \textit{\textbf{q}}$_i$=[\textit{q}$_{11}$\quad\textit{q}$_{12}$\quad $\cdots$\quad\textit{q}$_{1m}$]\textsuperscript{T} \\ \end{tabular}

for all 1≤i≤n. All numbers except m and n are floating-point. Blank characters are irrevelant.
输出解释

It is known that both reflections and rotations are linear transformations, which are represented by squarematrices. In particular, in the m-dimensional Euclidean space, they are represented by m × m matrices. Furthermore, composition of linear transformations is represented by the product of the corresponding matrices. Therefore, if the desire sequence of reflections and rotations exists, you are to output a matrix H in the format


\begin{tabular}{cccc} \textit{m} & & & \\ \textit{h}$_{11}$ & \textit{h}$_{12}$ & $\cdots$ & \textit{h}$_{1m}$ \\ \textit{h}$_{21}$ & \textit{h}$_{22}$ & $\cdots$ & \textit{h}$_{2m}$ \\ $\vdots$ & $\vdots$ & $\ddots$ & $\vdots$ \\ \textit{h}$_{m1}$ & \textit{h}$_{m2}$ & $\cdots$ & \textit{h}$_{mm}$ \\ \end{tabular}

such that Hpi = qi for all 1≤i≤n; otherwise, you only have to output an asterisk ("*"). Blank characters are irrevelant.

输入样例
2 2
-0.923896909208131 -0.150594719880319
-3.269301773087776E-002 0.871630392603206
0.402113583440769 -0.845321793468377
0.735234663492202 0.469295604408862
输出样例
2
-0.569248928113214700 0.822165225390831260 
0.822165225390831590 0.569248928113214810 

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3707

最后修改于 2020-10-29T07:08:39+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
10000 65536