Dãy con tăng dài nhất (bản khó)

View as PDF

Submit solution


Points: 0.05 (partial)
Time limit: 0.3s
Memory limit: 512M
Input: stdin
Output: stdout

Problem source:
Bài cổ điển
Problem types
Allowed languages
C, C++, Go, Java, Kotlin, Pascal, PyPy, Python, Rust, Scratch

(Giống bài LIQ) Cho một dãy gồm ~N~ số nguyên (~1~ ~\leq~ ~N~ ~\leq~ ~30000~). Hãy tìm dãy con tăng dài nhất trong dãy đó. In ra số lượng phần tử của dãy con. Các số trong phạm vi longint.

Input

  • Dòng đầu tiên gồm số nguyên ~N~.
  • Dòng thứ hai gồm ~N~ số mô tả dãy.

Output

Gồm một số nguyên duy nhất là đáp số của bài toán

Sample Input

5
2 1 4 3 5

Sample Output

3

Comments

Please read the guidelines before commenting.



  • -42
    nthquan_1505  commented on March 30, 2023, 4:22 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -19
    maintainit  commented on Feb. 21, 2023, 2:17 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


    • -7
      harmxvu  commented on June 24, 2023, 1:15 p.m.

      This comment is hidden due to too much negative feedback. Show it anyway.


  • -17
    boneman23  commented on Jan. 8, 2023, 9:47 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


    • -11
      MaiThanh1342  commented on Jan. 9, 2023, 8:54 a.m.

      This comment is hidden due to too much negative feedback. Show it anyway.


  • -17
    lkva2019  commented on Jan. 7, 2023, 9:00 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


  • -5
    thanh20092007  commented on Aug. 28, 2022, 3:31 a.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


    • 1
      minhducle31o  commented on April 19, 2023, 9:09 a.m.

      bạn cố gắng là làm được mà. cố lên!!!


  • -87
    modwwe  commented on July 11, 2022, 5:18 p.m.

    This comment is hidden due to too much negative feedback. Show it anyway.


    • -5
      minhducle31o  commented on April 19, 2023, 9:09 a.m.

      This comment is hidden due to too much negative feedback. Show it anyway.


  • 25
    kennikai  commented on Dec. 31, 2021, 5:04 a.m. edit 2

    bài này làm thấm phết!