for문을 이용해 체크하면 쉽게 해결할 수 있는 문제입니다.
#include <iostream>
int main()
{
int n[8];
for (int i = 0; i < 8; i++)
std::cin >> n[i];
bool is_Ascending = true;
bool is_Descending = true;
for (int i = 0; i < 8; i++)
{
if (n[i] != i + 1)
is_Ascending = false;
if (8 - n[i] != i)
is_Descending = false;
}
if (is_Ascending)
std::cout << "ascending";
else if (is_Descending)
std::cout << "descending";
else
std::cout << "mixed";
return 0;
}