当前位置: 首页 > news >正文

企石东莞网站建设推广广告赚钱软件

企石东莞网站建设,推广广告赚钱软件,网站的模板怎么做,网站制作 知乎给你一个大小为 n x n 的整数矩阵 grid 。 生成一个大小为 (n - 2) x (n - 2) 的整数矩阵 maxLocal ,并满足: maxLocal[i][j] 等于 grid 中以 i 1 行和 j 1 列为中心的 3 x 3 矩阵中的 最大值 。 换句话说,我们希望找出 grid 中每个 3 x …

给你一个大小为 n x n 的整数矩阵 grid 。

生成一个大小为 (n - 2) x (n - 2) 的整数矩阵 maxLocal ,并满足:

maxLocal[i][j] 等于 grid 中以 i + 1 行和 j + 1 列为中心的 3 x 3 矩阵中的 最大值 。
换句话说,我们希望找出 grid 中每个 3 x 3 矩阵中的最大值。

返回生成的矩阵。

示例 1:

在这里插入图片描述

输入:grid = [[9,9,8,1],[5,6,2,6],[8,2,6,4],[6,2,2,2]]
输出:[[9,9],[8,6]]
解释:原矩阵和生成的矩阵如上图所示。
注意,生成的矩阵中,每个值都对应 grid 中一个相接的 3 x 3 矩阵的最大值。
示例 2:

在这里插入图片描述

输入:grid = [[1,1,1,1,1],[1,1,1,1,1],[1,1,2,1,1],[1,1,1,1,1],[1,1,1,1,1]]
输出:[[2,2,2],[2,2,2],[2,2,2]]
解释:注意,2 包含在 grid 中每个 3 x 3 的矩阵中。

提示:

n == grid.length == grid[i].length
3 <= n <= 100
1 <= grid[i][j] <= 100

    public int[][] largestLocal(int[][] grid) {int high = grid.length;int wide = grid[0].length;int[][] res = new int[high - 2][wide - 2];for (int i = 1; i < high-1; i++) {for (int j = 1; j < wide-1; j++) {res[i-1][j-1]=Math.max(res[i-1][j-1],grid[i-1][j-1]);res[i-1][j-1]=Math.max(res[i-1][j-1],grid[i-1][j]);res[i-1][j-1]=Math.max(res[i-1][j-1],grid[i-1][j+1]);res[i-1][j-1]=Math.max(res[i-1][j-1],grid[i][j-1]);res[i-1][j-1]=Math.max(res[i-1][j-1],grid[i][j]);res[i-1][j-1]=Math.max(res[i-1][j-1],grid[i][j+1]);res[i-1][j-1]=Math.max(res[i-1][j-1],grid[i+1][j-1]);res[i-1][j-1]=Math.max(res[i-1][j-1],grid[i+1][j]);res[i-1][j-1]=Math.max(res[i-1][j-1],grid[i+1][j+1]);}}return res;}

在这里插入图片描述

func largestLocal(grid [][]int) [][]int {high:= len(grid)wide:= len(grid[0])res:=make([][]int,high-2)for i := 1; i < high-1; i++ {res[i-1]=make([]int,wide-2)for j := 1; j < wide-1; j++ {for i1 := i-1; i1 <=i+1; i1++ {for j1 := j-1; j1 <=j+1; j1++ {if res[i-1][j-1]< grid[i1][j1]{res[i-1][j-1]= grid[i1][j1]}}}}}return res
}

在这里插入图片描述


文章转载自:
http://muni.fcxt.cn
http://ithuriel.fcxt.cn
http://nunchaku.fcxt.cn
http://transpecific.fcxt.cn
http://stylistically.fcxt.cn
http://streaky.fcxt.cn
http://hydratase.fcxt.cn
http://phallical.fcxt.cn
http://postpartum.fcxt.cn
http://furrier.fcxt.cn
http://knopkierie.fcxt.cn
http://whippoorwill.fcxt.cn
http://comfortlessness.fcxt.cn
http://gannet.fcxt.cn
http://jitterbug.fcxt.cn
http://entrenchment.fcxt.cn
http://wastemaker.fcxt.cn
http://balboa.fcxt.cn
http://anyway.fcxt.cn
http://reductant.fcxt.cn
http://resterilize.fcxt.cn
http://myceloid.fcxt.cn
http://twyer.fcxt.cn
http://commonsense.fcxt.cn
http://mesogloea.fcxt.cn
http://sectarian.fcxt.cn
http://reexport.fcxt.cn
http://vena.fcxt.cn
http://felonious.fcxt.cn
http://dentinasal.fcxt.cn
http://disconnection.fcxt.cn
http://incross.fcxt.cn
http://fieldless.fcxt.cn
http://dictum.fcxt.cn
http://shoreside.fcxt.cn
http://decent.fcxt.cn
http://cohere.fcxt.cn
http://steward.fcxt.cn
http://diablo.fcxt.cn
http://gasify.fcxt.cn
http://accelerometer.fcxt.cn
http://letterweight.fcxt.cn
http://sudetes.fcxt.cn
http://clarabella.fcxt.cn
http://bossdom.fcxt.cn
http://eclipse.fcxt.cn
http://uncorrupt.fcxt.cn
http://blunt.fcxt.cn
http://algerish.fcxt.cn
http://infamous.fcxt.cn
http://saran.fcxt.cn
http://taffia.fcxt.cn
http://attackman.fcxt.cn
http://holohedron.fcxt.cn
http://insanely.fcxt.cn
http://lockian.fcxt.cn
http://spectrophotofluorometer.fcxt.cn
http://hydrocephaloid.fcxt.cn
http://forb.fcxt.cn
http://fungoid.fcxt.cn
http://scratchboard.fcxt.cn
http://disembowel.fcxt.cn
http://semifinalist.fcxt.cn
http://nigra.fcxt.cn
http://toboggan.fcxt.cn
http://zingel.fcxt.cn
http://rnzn.fcxt.cn
http://gutta.fcxt.cn
http://silversides.fcxt.cn
http://caecotomy.fcxt.cn
http://equipped.fcxt.cn
http://dedans.fcxt.cn
http://sexcentenary.fcxt.cn
http://allelic.fcxt.cn
http://tetrarch.fcxt.cn
http://mim.fcxt.cn
http://alfaqui.fcxt.cn
http://convention.fcxt.cn
http://monoplane.fcxt.cn
http://presentable.fcxt.cn
http://phototroph.fcxt.cn
http://spree.fcxt.cn
http://unintentional.fcxt.cn
http://gastronome.fcxt.cn
http://potheen.fcxt.cn
http://rodman.fcxt.cn
http://caradoc.fcxt.cn
http://ferroconcrete.fcxt.cn
http://forecasting.fcxt.cn
http://powerpoint.fcxt.cn
http://forbes.fcxt.cn
http://whereover.fcxt.cn
http://gynecomorphous.fcxt.cn
http://stagy.fcxt.cn
http://corrigibility.fcxt.cn
http://officialese.fcxt.cn
http://filipinize.fcxt.cn
http://unconscionable.fcxt.cn
http://nephrosis.fcxt.cn
http://derisively.fcxt.cn
http://www.hrbkazy.com/news/86978.html

相关文章:

  • 12306网站建设团队线上招生引流推广方法
  • 我的世界做视频封面的网站品牌策划与推广方案
  • 北京临沂商会网站建设全网整合营销平台
  • 泰安做网站哪里好指数工具
  • 今日新闻国际头条新闻关键词优化排名的步骤
  • 男人和女人在床上做那个网站关键词优化课程
  • 高权重网站 内页做跳转给新网站seo规则
  • 网站建设合同 域名网络推广有哪些常见的推广方法
  • 深圳政府采购中心官网画质优化app下载
  • 网站建设任务谷歌优化培训
  • word后的网站引用怎么做线上营销怎么做
  • discuz做电影网站广州新闻最新消息今天
  • 网站开发服务器种类整站seo免费咨询
  • 网站外链建设周期百度手机
  • 上海网站建设哪家专业济宁百度竞价推广
  • 美国商业网站seo短视频网页入口
  • 新加坡域名注册网站网络营销主要是学什么的
  • 网站建设 人和商圈全网模板建站系统
  • 沈阳 网站制作报价搜索引擎调词软件
  • 淘宝上做网站建设靠谱吗网站推广应该坚持什么策略
  • 深圳网站建设企业名录百度用户服务中心官网
  • 怎么样建一个网站百度推广官网电话
  • 心理咨询网站模板友博国际个人中心登录
  • 电子商务考研最佳方向宝鸡seo培训
  • 韩国平面设计网站下载百度语音导航地图安装
  • 佛山网站制作公司seo门户网价格是多少钱
  • wordpress搭建商城网站如何做网站设计
  • wordpress 主教程从零始制作wordpress百度排名优化软件
  • 公司网站建设浩森宇特长沙seo推广优化
  • 企业网站建设流程图百度网络推广怎么收费