Skip to main content

Posts

Showing posts with the label Codeforces Round 793(Div. 2)

Codeforces Round #793 (Div. 2)(C. LIS or Reverse LIS?)

just make the  array  like that ->->-> (low-> -> high -> -> low) So we can divide it by two part  (low -> -> high)[fot LIS]  &  (high -> -> low)[reverse LIS] Example: 1   1   2   3   4   3   2   2   1 LIS = 1   1   2   3   4   3   2   2   1 Reverse LIS= 1   1   2   3   4   3   2   2   1 Example: 1   1   2   2   1 LIS = 1   1   2   2   1 Reverse LIS= 1   1   2   2   1 Example: 1   7   9   6   5 ...