{"problem":{"name":"BZOJ1278 向量 vector","description":{"content":"一个二维向量 $(x,y)$ 的权定义为 $x^2+y^2$。已知一个由 $n$ 个二维向量组成的集合，求该集合的一个子集，使该子集中的向量和的权尽可能大。","description_type":"Markdown"},"platform":"Luogu","limit":{"time_limit":1000,"memory_limit":524288},"difficulty":{"LuoguStyle":"P6"},"is_remote":true,"is_sync":true,"sync_url":null,"sign":"LGP10671"},"statements":[{"statement_type":"Markdown","content":"一个二维向量 $(x,y)$ 的权定义为 $x^2+y^2$。已知一个由 $n$ 个二维向量组成的集合，求该集合的一个子集，使该子集中的向量和的权尽可能大。\n\n## Input\n\n第 $1$ 行一个正整数 $n$，表示 $n$ 个向量。\n\n下面 $n$ 行，每行 $2$ 个实数，表示 $n$ 个向量 $(x_i,y_i)$。\n\n## Output\n\n输出 $1$ 个实数，即向量和最大的权，精确到小数点后 $3$ 位。\n\n[samples]\n\n## Note\n\n数据保证，$1\\leq n\\leq 100000$。","is_translate":false,"language":"English"}],"meta":{"iden":"LGP10671","tags":["计算几何","O2优化","随机化"],"sample_group":[["3\n1 1\n1 0\n0 -1","5.000"]],"created_at":"2026-03-03 11:09:25"}}