1
2
3
4
5
6
7
8
9
10
11
12
|
def sol(nums):
ans =False
if nums==sorted(nums) or nums==sorted(nums,reverse=True) :
ans=True
return ans
print("Gnomes:")
for i in range(int(input())):
nums=list(map(int,input().split()))
if sol(nums)== True:
print("Ordered")
else :
print("Unordered")
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 25494 단순한 문제 (Small) (0) | 2022.08.30 |
---|---|
codeforces 1714C - Minimum Varied Number (0) | 2022.08.18 |
백준 4696 St. Ives (0) | 2022.08.02 |
codeforces 200B - Drinks (0) | 2022.07.20 |
leetcode 1702A - Round Down the Price (0) | 2022.07.19 |
댓글