Files
PAT/source/html/b1004.html
T

23 lines
1.9 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.
成绩排名
<div class="ques-view"><p>读入 <span class="katex"><span class="katex-mathml"><math><mrow><mi>n</mi></mrow>n</math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.43056em;"></span><span class="strut bottom" style="height:0.43056em;vertical-align:0em;"></span><span class="base textstyle uncramped"><span class="mord mathit">n</span></span></span></span>(<span class="katex"><span class="katex-mathml"><math><mrow><mo>&gt;</mo><mn>0</mn></mrow>&gt;0</math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.64444em;"></span><span class="strut bottom" style="height:0.68354em;vertical-align:-0.0391em;"></span><span class="base textstyle uncramped"><span class="mrel">&gt;</span><span class="mord mathrm">0</span></span></span></span>)名学生的姓名、学号、成绩,分别输出成绩最高和成绩最低学生的姓名和学号。</p>
<h3 id="-">输入格式:</h3>
<p>每个测试输入包含 1 个测试用例,格式为</p>
<pre><code>第 1 行:正整数 n
第 2 行:第 1 个学生的姓名 学号 成绩
第 3 行:第 2 个学生的姓名 学号 成绩
... ... ...
第 n+1 行:第 n 个学生的姓名 学号 成绩
</code></pre><p>其中<code>姓名</code>和<code>学号</code>均为不超过 10 个字符的字符串,成绩为 0 到 100 之间的一个整数,这里保证在一组测试用例中没有两个学生的成绩是相同的。</p>
<h3 id="-">输出格式:</h3>
<p>对每个测试用例输出 2 行,第 1 行是成绩最高学生的姓名和学号,第 2 行是成绩最低学生的姓名和学号,字符串间有 1 空格。</p>
<h3 id="-">输入样例:</h3>
<pre><code class="lang-in">3
Joe Math990112 89
Mike CS991301 100
Mary EE990830 95
</code></pre>
<h3 id="-">输出样例:</h3>
<pre><code class="lang-out">Mike CS991301
Joe Math990112
</code></pre>
</div>