@anonymous/

LumpyEnlightenedPhalarope

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
e=sorted
f=lambda a:(a==e(a)[::-1])+(e({*a})[::-1]==a)

tests = [
  [7,5,4,3,1],
  [42,41],
  [5],
  [27,19,19,10,3],
  [6,4,2,2,2],
  [9,9,9,9],
  [1,2,3,2],
  [10,9,8,7,12],
  [4,6,4,4,2]
]

for test in tests:
  print(f(test))