Dãy số #1

View as PDF

Submit solution

Points: 100.00 (partial)
Time limit: 1.0s
Memory limit: 102M
Input: stdin
Output: stdout

Author:
Problem type

Nhập vào dãy ~A~ có ~n~ phần tử. Tính đoạn con dài nhất chứa các phần tử bằng nhau của dãy ~A~

Input
  • Số nguyên dương ~n~ ~(1 \leq n \leq 1000)~
  • ~n~ số nguyên ~a_1,a_2,...,a_n~ ~(1 \leq a_i \leq 10^6)~
Output
  • In ra độ dài của đoạn con tìm được
Example

Input

8
1 2 2 2 3 4 3 4

Output

3

Comments

Please read the guidelines before commenting.


There are no comments at the moment.