3 solutions

  • 0
    @ 2025-6-7 11:38:48
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int a,b,c;
    	cin>>a>>b>>c;
    	if(a>b)
    	{
    		int temp=a;
    		a=b;
    		b=temp;
    	}
    	if(b>c)
    	{
    		int temp=b;
    		b=c;
    		c=temp;
    	}
    	if(a>b)
    	{
    		int temp=a;
    		a=b;
    		b=temp;
    	}
    	if(b-a==c-b) cout<<"Yes";
    	else cout<<"No";
    	return 0;
    }
    

    [ABC201A] 微小等差数列(Tiny Arithmetic Sequence)

    Information

    ID
    2310
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    49
    Accepted
    23
    Uploaded By