| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 381 | 199 | 187 | 53.125% |
Every day, Eugene logs how many cups of water he drank. He forgot to log one entry in his journal though, but he remembers the minimum number and maximum number of cups of water he drank every day since he started logging his journal, and that there was at least one day where he drank the minimum and one day where he drank the maximum. Compute all possible amounts of cups of water he could have imbibed on the day he forgot to log.
The first line of input contains three integers $n$ (2ドル \le n \le 50$), $a$ and $b$ (1ドル \le a \le b \le 50$), where $n$ is the number of days in Eugene's log, $a$ is the minimum number of cups of water he drank on any day, and $b$ is the associated maximum.
Each of the next $n-1$ lines contains a single integers $w$ ($a \le w \le b$). These are the entries in Eugene's log for every day except the day he forgot to log an entry.
Output in increasing order, all of the possible values for the missing entry separated by whitespace, or simply output -1 if Eugene's memory is faulty and it isn't possible.
5 1 5 1 2 4 5
1 2 3 4 5
5 1 5 1 2 3 4
5
ICPC > Regionals > North America > North America Qualification Contest > ICPC North America Qualifier 2023 L번