マイナビプログラミングコンテスト2021(AtCoder Beginner Contest 201)
翻译中…
Problem Statement
翻译中…
You are given a sequence of three numbers: $A=(A_1,A_2,A_3)$.
翻译中…
Is it possible to rearrange the elements of $A$ into an arithmetic sequence?
翻译中…
In other words, is it possible to rearrange the elements of $A$ so that $A_3-A_2=A_2-A_1$?
翻译中…
Constrains
翻译中…
$1 \leq A_i \leq 100$- All values in input are integers.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
A_1 A_2 A_3
翻译中…
Output
翻译中…
If it is possible to rearrange the elements of $A$ into an arithmetic sequence, print Yes; otherwise, print No.
翻译中…
样例
Input #1
5 1 3
Output #1
Yes
We can rearrange them into an arithmetic sequence by, for example, making it $(1,3,5)$.
Input #2
1 4 3
Output #2
No
There is no way to rearrange them into an arithmetic sequence.
Input #3
5 5 5
Output #3
Yes
All elements of $A$ may be equal, or $A$ may be an arithmetic sequence already.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。