mirror of
https://github.com/xlucn/PAT.git
synced 2026-11-04 00:38:13 +08:00
37 lines
4.1 KiB
HTML
37 lines
4.1 KiB
HTML
C语言竞赛
|
||
<div class="ques-view"><p>C 语言竞赛是浙江大学计算机学院主持的一个欢乐的竞赛。既然竞赛主旨是为了好玩,颁奖规则也就制定得很滑稽:</p>
|
||
<ul>
|
||
<li>0、冠军将赢得一份“神秘大奖”(比如很巨大的一本学生研究论文集……)。</li>
|
||
<li>1、排名为素数的学生将赢得最好的奖品 —— 小黄人玩偶!</li>
|
||
<li>2、其他人将得到巧克力。</li>
|
||
</ul>
|
||
<p>给定比赛的最终排名以及一系列参赛者的 ID,你要给出这些参赛者应该获得的奖品。</p>
|
||
<h3 id="-">输入格式:</h3>
|
||
<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.68333em;"></span><span class="strut bottom" style="height:0.68333em;vertical-align:0em;"></span><span class="base textstyle uncramped"><span class="mord mathit" style="margin-right:0.10903em;">N</span></span></span></span>(<span class="katex"><span class="katex-mathml"><math><mrow><mo>≤</mo><mn>1</mn><msup><mn>0</mn><mn>4</mn></msup></mrow>\le 10^4</math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.8141079999999999em;"></span><span class="strut bottom" style="height:0.950078em;vertical-align:-0.13597em;"></span><span class="base textstyle uncramped"><span class="mrel">≤</span><span class="mord mathrm">1</span><span class="mord"><span class="mord mathrm">0</span><span class="msupsub"><span class="vlist"><span style="top:-0.363em;margin-right:0.05em;"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;"></span></span><span class="reset-textstyle scriptstyle uncramped mtight"><span class="mord mathrm mtight">4</span></span></span><span class="baseline-fix"><span class="fontsize-ensurer reset-size5 size5"><span style="font-size:0em;"></span></span></span></span></span></span></span></span></span>),是参赛者人数。随后 <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.68333em;"></span><span class="strut bottom" style="height:0.68333em;vertical-align:0em;"></span><span class="base textstyle uncramped"><span class="mord mathit" style="margin-right:0.10903em;">N</span></span></span></span> 行给出最终排名,每行按排名顺序给出一位参赛者的 ID(4 位数字组成)。接下来给出一个正整数 <span class="katex"><span class="katex-mathml"><math><mrow><mi>K</mi></mrow>K</math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.68333em;"></span><span class="strut bottom" style="height:0.68333em;vertical-align:0em;"></span><span class="base textstyle uncramped"><span class="mord mathit" style="margin-right:0.07153em;">K</span></span></span></span> 以及 <span class="katex"><span class="katex-mathml"><math><mrow><mi>K</mi></mrow>K</math></span><span aria-hidden="true" class="katex-html"><span class="strut" style="height:0.68333em;"></span><span class="strut bottom" style="height:0.68333em;vertical-align:0em;"></span><span class="base textstyle uncramped"><span class="mord mathit" style="margin-right:0.07153em;">K</span></span></span></span> 个需要查询的 ID。</p>
|
||
<h3 id="-">输出格式:</h3>
|
||
<p>对每个要查询的 ID,在一行中输出 <code>ID: 奖品</code>,其中奖品或者是 <code>Mystery Award</code>(神秘大奖)、或者是 <code>Minion</code>(小黄人)、或者是 <code>Chocolate</code>(巧克力)。如果所查 ID 根本不在排名里,打印 <code>Are you kidding?</code>(耍我呢?)。如果该 ID 已经查过了(即奖品已经领过了),打印 <code>ID: Checked</code>(不能多吃多占)。</p>
|
||
<h3 id="-">输入样例:</h3>
|
||
<pre><code class="lang-in">6
|
||
1111
|
||
6666
|
||
8888
|
||
1234
|
||
5555
|
||
0001
|
||
6
|
||
8888
|
||
0001
|
||
1111
|
||
2222
|
||
8888
|
||
2222
|
||
</code></pre>
|
||
<h3 id="-">输出样例:</h3>
|
||
<pre><code class="lang-out">8888: Minion
|
||
0001: Chocolate
|
||
1111: Mystery Award
|
||
2222: Are you kidding?
|
||
8888: Checked
|
||
2222: Are you kidding?
|
||
</code></pre>
|
||
</div> |