Brick towers
시간 제한2초메모리 제한1024 MB
평균이 정확히 k인 가장 긴 연속 부분 배열을 찾아 길이와 시작 위치(1부터)를 출력한다.
문제
Young Peter has got a wonderful gift for his birthday --- the whole pack of wooden bricks. He has already made towers, with heights , , , bricks, correspondingly.
Peter's favorite number is , so he likes towers with height exactly bricks. Peter finds a set of consecutive towers good if their average height is equal to exactly 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 and (; ). The second line of input file contains integer numbers () --- heights of the towers.
출력
Output two integer numbers and --- amount of towers in the largest good set and number of the first tower in this set. Towers are numbered from 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 .