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

11831번 - Hyper-minimum 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 256 MB1613770.000%

문제

There is a 4-dimensional array X, each index of which is in interval from 1 to N. Your task is to construct new 4-dimensional array Y , elements of which can be calculated using the next formula: Y [i1, i2, i3, i4] = min(X[j1, j2, j3, j4]), where 1 ≤ ik ≤ N − M + 1, ik ≤ jk ≤ ik + M − 1, and M is given.

입력

First line of the input file contains N and M (1 ≤ M ≤ N). Next lines of the input file contain elements of array X. The number of elements will be not more than 1500000 and elements will be integers not exceeding 109 by absolute value. They are given in such order, that the array can be read using following pseudocode:

for i = 1 to N:
 for j = 1 to N:
 for k = 1 to N:
 for l = 1 to N:
 read X[i, j, k, l]

출력

Output array Y in the same format as the X was given.

제한

예제 입력 1

1 1
1

예제 출력 1

1

예제 입력 2

3 2
3 1 4 -4 0 4 0 0 -3 0 -2 -5 5 3 5 -4 4 -3 -5 -4 -4 5 -1 0 -3 -2 -1 2 -5 -5 -1 1 1 -4 3 5 3 -3 -3 3 0 1 4 -1 -2 3 -2 5 4 -1 -5 3 -4 0 -3 -1 3 -1 4 4 -1 -5 -3 4 -4 5 1 5 -4 3 2 2 -2 -2 4 2 -4 -3 1 3 1

예제 출력 2

-5 -5 -4 -3 -5 -5 -4 -5 -5 -5 -5 -5 -4 -5 -4 -5

힌트

출처

Olympiad > International Zhautykov Olympiad > IZhO 2011 B번

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

출처

대학교 대회

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

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