QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 2048 MB Total points: 100

#14448. 三級跳遠

Statistics

你正在觀看你的朋友玩一款平台遊戲。在這款遊戲中,當玩家在直線上跳躍時,有三種不同的整數距離可以選擇。你不知道這三個距離分別是多少,但希望透過觀察遊戲過程來找出答案。

你已經看到你的朋友執行了多次「三連跳」(即連續朝同一個方向跳三次),並記錄了這三次跳躍的總距離。在每次三連跳中,你的朋友可以使用那三個整數距離中的任意一個,包括重複使用同一個距離一次或多次。經過長時間的觀察,你記錄了一份不重複的距離清單,並確信所有可能的三連跳總距離都在這份清單中。

給定你記錄下來的距離,你能否還原出那三個跳躍距離?

輸入格式

第一行包含一個整數 $n$ ($7 \le n \le 10$),代表你所觀察到的不重複距離數量。

下一行包含 $n$ 個以空白分隔的整數 $d$ ($1 \le d \le 1,000$)。這些是你的觀察結果,並已按嚴格遞增順序排列。

輸出格式

輸出三個以空白分隔的整數,代表那三個跳躍距離。請將它們按從小到大的順序輸出。保證這三個跳躍距離是唯一的。

範例

範例輸入 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.