3 solutions

  • 1
    @ 2025-6-7 11:44:28
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int a,b,c;
    	cin>>a>>b>>c;
    	if(a>b) swap(a,b);
    	if(b>c) swap(b,c);
    	if(a>b) swap(a,b);
    	if(b-a==c-b) cout<<"Yes";
    	else cout<<"No";
    	return 0;
    }
    
    • 0
      @ 2025-6-7 11:42:44
      #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;
      }
      • 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;
        }
        
        • 1

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

        Information

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