返回题库

南瓜配对 I

Paired Pumpkins I

专题
General / 综合
难度
L2

题目详情

Dracula 有 3 个南瓜,编号 1..3。已知任意两两重量和分别为 19、21、28(千克)。设重量为 w1,w2,w3w_1,w_2,w_3

若可行,求 w12+w22+w32w_1^2+w_2^2+w_3^2;若不可行则输出 -1。

Dracula has 33 pumpkins, labeled 131-3. He knows the mass of each pair of pumpkins is (in kgs) 19,21,19, 21, and 2828. Let w1,w2,w_1, w_2, and w3w_3 be the weights of the three pumpkins. If possible, find w12+w22+w32w_1^2 + w_2^2 + w_3^2. If this is impossible, enter 1-1.

解析

w1+w2=19,w2+w3=21,w1+w3=28w_1+w_2=19,\quad w_2+w_3=21,\quad w_1+w_3=28

解得 w1=13,w2=6,w3=15w_1=13,w_2=6,w_3=15

因此

132+62+152=430.13^2+6^2+15^2=430.

Original Explanation

Using the notation here, we can set up the system of equations w1+w2=19,w2+w3=21,w_1 + w_2 = 19, \quad w_2 + w_3 = 21, and w1+w3=28.w_1 + w_3 = 28. By subtracting the second equation from the first, we get that w1w3=2.w_1 - w_3 = -2. Adding this new equation to the third equation yields 2w1=26,2w_1 = 26, meaning w1=13.w_1 = 13. Substituting this back in, we get w2=6w_2 = 6 and w3=15.w_3 = 15. Therefore, w12+w22+w32=132+62+152=430.w_1^2 + w_2^2 + w_3^2 = 13^2 + 6^2 + 15^2 = 430.