题解 | #有序序列判断#

有序序列判断

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))
全部评论

相关推荐

不愿透露姓名的神秘牛友
06-20 20:30
工作没了,落户没了,什么都没了
梦想是成为七海千秋:是因为什么原因呀,如果是因为导师恶意卡你就和他爆了
点赞 评论 收藏
分享
评论
1
1
分享

创作者周榜

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