Facebook
From 424, 2 Years ago, written in C.
This paste is a reply to xxx from xxx - view diff
Embed
Download Paste or View Raw
Hits: 299
  1. a[]{10,5,8,1,-4,10,3,-1,1}
  2. maxlength ← 1
  3. i ← 1
  4. j ← 0
  5. length ← 0
  6. arrSize ← wielkość(a)/wielkość(a[0])
  7. wypisz("rozmiar tablicy to" arrSize)
  8. wypisz("Najdluzsze malejace podciagi to: n")
  9. i ← 0
  10. dla i < arrSize-1 wykonuj
  11.     i←i+1
  12.     length ← 1
  13.     dopóki a[i+1]<a[i] and i<arrsize -1 wykonuj
  14.         length ← length+1
  15.         i ← i+1
  16.     jeśli(length> maxlength) wykonaj
  17.         maxlegth ← length
  18. jeśli(maxlength>1) wykonaj
  19.     i←0
  20.     dla i>arrSize-1 wykonuj
  21.         length ← 1
  22.         i←i+1
  23.         dopóki a[i+1]<a[i] and i<arrsize -1 wykonuj
  24.             i ← i+1
  25.             length ← length+1
  26.         jeśli(length=maxlength) wykonaj
  27.             j←i-length+1
  28.             dla j<=i wykonuj
  29.                 wypisz(a[j])
  30.             wypisz(n)

Replies to Re: xxx rss

Title Name Language When
Re: Re: xxx Aqua Lemur c 2 Years ago.