#D. A - Tiny Arithmetic Sequence

    传统题 1000ms 256MiB

A - Tiny Arithmetic Sequence

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

A - Tiny Arithmetic Sequence

Score : $100$ points

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:

A1A_1 A2A_2 A3A_3

Output

If it is possible to rearrange the elements of $A$ into an arithmetic sequence, print Yes; otherwise, print No.


5 1 3
Yes

We can rearrange them into an arithmetic sequence by, for example, making it $(1,3,5)$.


1 4 3
No

There is no way to rearrange them into an arithmetic sequence.


5 5 5
Yes

All elements of $A$ may be equal, or $A$ may be an arithmetic sequence already.

2025寒假ATC码力训练营第十三次练习

未参加
状态
已结束
规则
IOI
题目
6
开始于
2025-2-6 13:00
结束于
2025-2-6 14:30
持续时间
1.5 小时
主持人
参赛人数
6