QOJ.ac

QOJ

حد الوقت: 1 s حد الذاكرة: 2048 MB مجموع النقاط: 100

#14448. 三段跳び

الإحصائيات

あなたは友人がプラットフォーマーゲームをプレイしている様子を見ています。このゲームでは、プレイヤーが直線上でジャンプする際、移動距離として3種類の異なる整数を選択できます。あなたはその3つの距離が何であるかを知りませんが、ゲームプレイを観察することで突き止めたいと考えています。

友人が「トリプルジャンプ」(同じ方向に連続して3回ジャンプすること)を何度も行っているのを見て、3回のジャンプを合わせた合計移動距離を記録しました。各トリプルジャンプにおいて、友人は3つの整数距離のうちどれでも使用でき、同じ距離を1回以上繰り返すことも可能です。長い時間をかけて観察した結果、あなたはユニークな距離のリストを記録しました。そして、可能なトリプルジャンプの距離はすべてこのリストに含まれていると確信しています。

あなたが書き留めた距離から、元の3つの距離を復元できますか?

入力

入力の最初の行には、あなたが記録したユニークな観測値の数を示す整数 $n$ ($7 \le n \le 10$) が含まれます。

次の行には、$n$ 個のスペース区切りの整数 $d$ ($1 \le d \le 1,000$) が含まれます。これらはあなたの観測値であり、昇順に並んでいます。

出力

3つのスペース区切りの整数を1行に出力してください。これらが求める3つのジャンプ距離です。小さい順に並べて出力してください。3つのジャンプ距離はユニークであることが保証されています。

入出力例

入力 1

10
6 9 10 12 13 14 15 16 17 18

出力 1

2 5 6

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.