Submission #1149407

#TimeUsernameProblemLanguageResultExecution timeMemory
1149407maomaoMountains (NOI20_mountains)Pypy 3
Compilation error
0 ms0 KiB
 '''
 https://oj.uz/problem/view/NOI20_mountains
 Score: 64/100
 '''

 n = int(input())
 height = [int(x) for x in input().split()]
 ans = 0

 while len(height)>=3:
   left = []
   right = []
   maxvalue=max(height)
   numofmax = height.count(maxvalue)
   for k in range(numofmax):
       m = height.index(maxvalue)
       for i in range(0,m):
         if height[i] < height[m]:
             left.append(height[i])
       for i in range(m+1,len(height)):
         if height[i] < height[m]:
             right.append(height[i])  
       ans += len(left)*len(right)
       height.pop(m)
 print(ans) 

Compilation message (stdout)

Compiling 'Mountains.py'...
*** Sorry: IndentationError: unexpected indent (Mountains.py, line 1)

=======