Logo
(追記) (追記ここまで)

29544번 - Brick towers 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB21161372.222%

문제

Young Peter has got a wonderful gift for his birthday --- the whole pack of wooden bricks. He has already made $n$ towers, with heights $a_1,ドル $a_2,ドル $\ldots,ドル $a_n$ bricks, correspondingly.

Peter's favorite number is $k,ドル so he likes towers with height exactly $k$ bricks. Peter finds a set of consecutive towers good if their average height is equal to exactly $k$ bricks. He wants to find a good set of towers containing as many consecutive towers as possible.

Help Peter to find the largest good set of towers.

입력

The first line of input file contains two integer numbers $n$ and $k$ (1ドル \le n \le 100000$; 1ドル \le k \le 10^9$). The second line of input file contains $n$ integer numbers $a_i$ (1ドル \le a_i \le 10^9$) --- heights of the towers.

출력

Output two integer numbers $l$ and $m$ --- amount of towers in the largest good set and number of the first tower in this set. Towers are numbered from 1ドル$ in order of appearance in the input file. If there are multiple answers, output any of them. If there is no good set output single number 0ドル$.

제한

예제 입력 1

3 2
2 1 3

예제 출력 1

3 1

예제 입력 2

5 3
1 2 3 4 6

예제 출력 2

3 2

예제 입력 3

4 3
1 2 5 6

예제 출력 3

0

힌트

출처

Olympiad > Russian Olympiad in Informatics > Internet Olympiads in Informatics > 2010-2011 Season > February 11, 2011 C번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /