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

建议使用的浏览器:

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

3039:A high-dimensional problem

题目描述
As we all know, a point in n-dimensional space can be represented as a vector (x1, x2, ..., xn), where xi is a real number. Given a vector D = (d1, d2, ..., dn), we can generate a series of planes perpendicular to D: each plane satisfies the condition that for any two point on the plane, say A = (a1, a2, ..., an), B = (b1, b2, ..., bn), the inner product of (A - B) and D is zero, ie. (a1 - b1) * d1 + (a2 - b2) * d2 + ... + (an - bn) * dn = 0, and we call D the normal vector of the plane. let A * B denotes the inner product of A and B.

Here are n planes in n-dimensional space: S1, S2, ..., Sn with normal vector D1, D2, ..., Dn respectively. And P1, P2, ..., Pn lies on S1, S2,..., Sn respectively. We don't know the coordinates of P1, P2, ..., Pn, but instead we know D1 * P1, D2 * D2, ..., Dn * Pn. Can we find out the point of intersection of S1, S2, ..., Sn?
输入解释
There will be multiple test cases. Each data set will be formatted according to the following description:
1. A line containing two integers n, m, 3 <= n <= 100, 1 <= m <= n, m represents the number of queries to the same D1, D2, ..., Dn.
2. line 1 + i(1 <= i <= n) : n real number denoting the coordinates of Di.
3. line 1 + n + i(1 <= i <= m): n real number denoting D1 * P1, D2 * P2, ..., Dn * Pn.
输出解释
For each test data, there will be exactly m lines. For each query output a line containing the coordinates of the point of intersetion of S1, S2, ..., Sn.Round all the coordinates to the second digit after the decimal point.You may assume there will always be exactly one such point
输入样例
3 1
1 0 0
0 1 0
0 0 1
1 1 1
输出样例
1.00 1.00 1.00
来自杭电HDUOJ的附加信息
Recommend gaojie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3039

最后修改于 2020-10-25T22:59:28+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)