Editorial for Подредба


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.

Submitting an official solution before solving the problem yourself is a bannable offence.
by: maya

Тестовете можете да видите тук.

Примерно решение на C++:

#include <iostream>
using namespace std;

int main()
{
    int h1,h2,h3,h4;
    cin>>h1>>h2>>h3>>h4;
    if(h1<h2 && h2<h3 && h3<h4)
      cout<<"Ascending"<<endl;
    else if(h1>h2 && h2>h3 && h3>h4)
      cout<<"Descending"<<endl;
    else 
      cout<<"Mixed"<<endl;
    return 0;
}

Comments

There are no comments at the moment.