【英语翻译Thisisasupersimpleproblem.Thedescriptionissimple,thesolutionissimple.Ifyoubelieveso,justreaditon.Orifyoudon't,justpretendthatyoucan'tseethisone.Wesayanelementisinsideamatrixifithasfourneighboringele】
英语翻译
Thisisasupersimpleproblem.Thedescriptionissimple,thesolutionissimple.Ifyoubelieveso,justreaditon.Orifyoudon't,justpretendthatyoucan'tseethisone.
Wesayanelementisinsideamatrixifithasfourneighboringelementsinthematrix(Thoseatthecornerhavetwoandontheedgehavethree).Anelementinsideamatrixiscalled"nice"whenitsvalueequalsthesumofitsfourneighbors.Amatrixiscalled"k-nice"ifandonlyifkoftheelementsinsidethematrixare"nice".
Nowgiventhesizeofthematrixandthevalueofk,youaretooutputanyoneofthe"k-nice"matrixofthegivensize.Itisguaranteedthatthereisalwaysasolutiontoeverytestcase.

