#P10671. BZOJ1278 向量 vector
BZOJ1278 向量 vector
Problem Description
The weight of a two-dimensional vector is defined as . Given a set consisting of two-dimensional vectors, find a subset such that the weight of the sum of the vectors in this subset is as large as possible.
Input Format
The first line contains a positive integer , indicating that there are vectors.
The next lines each contain real numbers, representing the vectors .
Output Format
Output real number, i.e., the maximum possible weight of the vector sum, accurate to digits after the decimal point.
3
1 1
1 0
0 -1
5.000
Hint
Constraints: it is guaranteed that .
Translated by ChatGPT 5