Tih_Monkes's blog

By Tih_Monkes, history, 10 months ago, In Russian

a = list(map(int, input().split())) l, r = 0, len(a) — 1 while(r — l >= 1): if(a[l] > a[l + 1]): a[l + 1], a[l] = a[l], a[l + 1] if(a[r] > a[r — 1]): a[r — 1], a[r] = a[r], a[r — 1] l += 1 r -= 1 print(max(a[l], a[r]))

  • Vote: I like it
  • -18
  • Vote: I do not like it