Skip to content

Commit

Permalink
idk what's going on
Browse files Browse the repository at this point in the history
Signed-off-by: MisileLab <[email protected]>
  • Loading branch information
MisileLab committed Sep 14, 2023
1 parent 0e8c25d commit fb700ba
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions projects/xobusy/bojs/27894.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
input()
input()
a = list(map(int, input().split(" ")))
e = 0
_cac = len(a)-1

def is_sorted(b, c, d):
return list(sorted([b, c, d])) == [b, c, d] or list(
sorted([b, c, d], reverse=True)
) == [b, c, d]

while e+2 <= _cac:
if is_sorted(a[e], a[e+1], a[e+2]):
print("POSSIBLE")
break
e += 1
else:
print("IMPOSSIBLE")
File renamed without changes.

0 comments on commit fb700ba

Please sign in to comment.