fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int n = 1, copy_n, ascend = 0, descend = 0;
  6. cin >> copy_n;
  7.  
  8. while (n != 0) {
  9. cin >> n;
  10. if (copy_n - n < 0) {
  11. ++ascend;
  12. } else if (copy_n - n > 0) {
  13. ++descend;
  14. }
  15. copy_n = n;
  16. }
  17. if (ascend > 0 && descend == 0) {
  18. cout << "crescator";
  19. } else if (descend > 0 && ascend == 0) {
  20. cout << "descrescator";
  21. } else {
  22. cout << "nemonoton";
  23. }
  24.  
  25. return 0;
  26. }
Success #stdin #stdout 0s 5316KB
stdin
12 29 0 3 2
stdout
nemonoton