Submit solution
Points:
0.25 (partial)
Time limit:
1.0s
Memory limit:
256M
Input:
stdin
Output:
stdout
Problem type
Allowed languages
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch
Cho dãy số ~A_1,A_2,...,A_n~. Hãy tìm độ dài của dãy con không giảm dài nhất (dãy con có thể không liên tiếp).
Dữ liệu:
- Dòng đầu chữa số nguyên dương ~n (n \le 10^3)~;
- Tiếp theo là một dòng chứa ~n~ phần tử ~A_1,A_2,...,A_n (|A_i|\le 10^9)~.
Kết quả:
- Ghi ra một số nguyên là kết quả tìm được.
Ví dụ:
Sample Input
5
1 3 2 2 5
Sample Output
4
Comments