题解 | #有序序列判断#

有序序列判断

http://www.nowcoder.com/practice/22e87f8a8d764a6582710f38d1b40c6e

n = int(input())
m = list(map(int,input().split()))
s = lambda x: "sorted" if x==sorted(x) or x==sorted(x,reverse=True) else "unsorted"
print(s(m))
全部评论

相关推荐

不愿透露姓名的神秘牛友
08-06 10:27
点赞 评论 收藏
分享
08-08 14:46
郑州大学 Java
点赞 评论 收藏
分享
评论
1
1
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务