Problem A: 判断有序

"
Time Limit $1$ 秒/Second(s) Memory Limit $512$ 兆字节/Megabyte(s)
提交总数 $942$ 正确数量 $673$
裁判形式 标准裁判/Standard Judge 我的状态 尚未尝试
难度 分类标签 数据结构

实现函数isSorted


判断整数数组元素是否已经按升序排序。

Java语言推荐 public static boolean isSorted(int[] table)

C/C++语言  int is_sorted(int*table,int n)

Python语言 def is_sorted(table)

一列数,需要判断的数组元素。不超过100个

如果已经排序输出YES

如果没有排序输出NO

1
2
3
4
5
6
YES