Files
PAT/html/b1063.html
T

32 lines
1.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<h1>1063. 计算谱半径(20)</h1>
<div id="problemContent">
<p>
在数学中,矩阵的“谱半径”是指其特征值的模集合的上确界。换言之,对于给定的n个复数空间的特征值{a<sub>1</sub>+b<sub>1</sub><i>i</i>, ..., a<sub>n</sub>+b<sub>n</sub><i>i</i>},它们的模为实部与虚部的平方和的开方,而“谱半径”就是最大模。
</p>
<p>现在给定一些复数空间的特征值,请你计算并输出这些特征值的谱半径。</p>
<p><b>
输入格式:
</b></p>
<p>
输入第一行给出正整数N(&lt;= 10000)是输入的特征值的个数。随后N行,每行给出1个特征值的实部和虚部,其间以空格分隔。注意:题目保证实部和虚部均为绝对值不超过1000的整数。
</p>
<p><b>
输出格式:
</b></p>
<p>
在一行中输出谱半径,四舍五入保留小数点后2位。
</p>
<b>输入样例:</b><pre>
5
0 1
2 0
-1 0
3 3
0 -3
</pre>
<b>输出样例:</b><pre>
4.24
</pre>
</div>