【英语翻译Thisisasupersimpleproblem-查字典问答网
分类选择

来自李维谦的问题

  【英语翻译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.

1回答
2020-08-0420:13
我要回答
提示:回答问题需要登录哦!
董长海

  呵呵,这是个智力题还是数学题...翻译:这是个超级简单的问题.问题的描述很简单,解答很简单.如果你相信,那么读下去.如果你认为不是,就当你没看见它好了.我们假定一个元素在矩阵当中,同时有四个相邻的元素在这个矩阵中...

2020-08-04 20:17:24
大家都在问
最新问答