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

怎样创办一个网站免费刷seo

怎样创办一个网站,免费刷seo,wordpress 淘宝客网站,cloudflare wordpress题目: 请你判断一个 9 x 9 的数独是否有效。只需要 根据以下规则 ,验证已经填入的数字是否有效即可。 数字 1-9 在每一行只能出现一次。数字 1-9 在每一列只能出现一次。数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次。(请参考示例…

题目:

请你判断一个 9 x 9 的数独是否有效。只需要 根据以下规则 ,验证已经填入的数字是否有效即可。

  1. 数字 1-9 在每一行只能出现一次。
  2. 数字 1-9 在每一列只能出现一次。
  3. 数字 1-9 在每一个以粗实线分隔的 3x3 宫内只能出现一次。(请参考示例图)

注意:

  • 一个有效的数独(部分已被填充)不一定是可解的。
  • 只需要根据以上规则,验证已经填入的数字是否有效即可。
  • 空白格用 '.' 表示。

思路:

可以用下标数组来判断有没有重复数字,只有1-9的话就创立数组,比如有9,那就a[9] +=1, 如果有数字大于1,则证明有重复

要判断的总共有9*3的数组:横排,竖排,9个小矩阵,做个map然后建立对应的数组即可; 按照上面的方法判断重复

代码:

 public boolean isValidSudoku(char[][] board) {Map<String, int[]> map = new HashMap<>();for (int i = 0; i < 9; i++) {for (int j = 0; j < 9; j++) {if (board[i][j] != '.') {String str = (i / 3) + "," + (j / 3);int[] flags = map.getOrDefault(str, new int[10]);int v1 = Integer.valueOf(String.valueOf(board[i][j]));flags[v1] += 1;map.put(str, flags);if (flags[v1] > 1) {return false;}int[] flagsCol = map.getOrDefault("R" + i, new int[10]);flagsCol[v1] += 1;if (flagsCol[v1] > 1) {return false;}map.put("R" + i, flagsCol);int[] flagsRow = map.getOrDefault("C" + j, new int[10]);flagsRow[v1] += 1;if (flagsRow[v1] > 1) {return false;}map.put("C" + j, flagsRow);}}}return true;}


文章转载自:
http://dinncoinertly.tpps.cn
http://dinncophencyclidine.tpps.cn
http://dinncononassessability.tpps.cn
http://dinncohellish.tpps.cn
http://dinncodistemperedness.tpps.cn
http://dinncowhitening.tpps.cn
http://dinncothanatophobia.tpps.cn
http://dinncofreakish.tpps.cn
http://dinncobackstay.tpps.cn
http://dinncomyxoma.tpps.cn
http://dinncogradatim.tpps.cn
http://dinncosupercilious.tpps.cn
http://dinncomultinuclear.tpps.cn
http://dinncowatchdog.tpps.cn
http://dinncoelongate.tpps.cn
http://dinncoworkpeople.tpps.cn
http://dinncomycenaean.tpps.cn
http://dinncocondom.tpps.cn
http://dinncoundeify.tpps.cn
http://dinncopostcava.tpps.cn
http://dinncoarmourer.tpps.cn
http://dinncounfrock.tpps.cn
http://dinncofirstcomer.tpps.cn
http://dinncoperiodization.tpps.cn
http://dinncoyeah.tpps.cn
http://dinncoheterotrophically.tpps.cn
http://dinncoomicron.tpps.cn
http://dinncoutilisation.tpps.cn
http://dinncocadence.tpps.cn
http://dinncofruity.tpps.cn
http://dinncoobtest.tpps.cn
http://dinncofainthearted.tpps.cn
http://dinncohyponoia.tpps.cn
http://dinncowordless.tpps.cn
http://dinncofrump.tpps.cn
http://dinncocornual.tpps.cn
http://dinncospooling.tpps.cn
http://dinncospermologist.tpps.cn
http://dinncochiroplasty.tpps.cn
http://dinncowhitebeard.tpps.cn
http://dinncobacon.tpps.cn
http://dinnconyctalopia.tpps.cn
http://dinnconaos.tpps.cn
http://dinncowish.tpps.cn
http://dinncoimperforate.tpps.cn
http://dinnconeanthropic.tpps.cn
http://dinncoadamic.tpps.cn
http://dinncosochi.tpps.cn
http://dinncoinformal.tpps.cn
http://dinncoseizin.tpps.cn
http://dinncoreconquest.tpps.cn
http://dinncoemersonian.tpps.cn
http://dinncomonosomic.tpps.cn
http://dinncomethyl.tpps.cn
http://dinncoheretical.tpps.cn
http://dinncocreatrix.tpps.cn
http://dinncognarled.tpps.cn
http://dinncoseverance.tpps.cn
http://dinncocontradictorily.tpps.cn
http://dinncopock.tpps.cn
http://dinncoheading.tpps.cn
http://dinncoastutely.tpps.cn
http://dinncoaorist.tpps.cn
http://dinncoprothetely.tpps.cn
http://dinncofinner.tpps.cn
http://dinncocissoidal.tpps.cn
http://dinncosuboxide.tpps.cn
http://dinncocancerophobia.tpps.cn
http://dinncoasperate.tpps.cn
http://dinncounsuspected.tpps.cn
http://dinncoantiproton.tpps.cn
http://dinncounright.tpps.cn
http://dinncoorography.tpps.cn
http://dinncocryptorchid.tpps.cn
http://dinncoaforecited.tpps.cn
http://dinncoautorotate.tpps.cn
http://dinncoyip.tpps.cn
http://dinncomicrocontinent.tpps.cn
http://dinncobillycock.tpps.cn
http://dinncoextracurriculum.tpps.cn
http://dinncoworldlet.tpps.cn
http://dinncocasuist.tpps.cn
http://dinncocomplacently.tpps.cn
http://dinncooutstrip.tpps.cn
http://dinncogeegaw.tpps.cn
http://dinncocursory.tpps.cn
http://dinncosubprefect.tpps.cn
http://dinncoscud.tpps.cn
http://dinncoprevail.tpps.cn
http://dinncotorpidly.tpps.cn
http://dinncohexode.tpps.cn
http://dinncoabsorbingly.tpps.cn
http://dinncoleitmotiv.tpps.cn
http://dinncokleig.tpps.cn
http://dinncojive.tpps.cn
http://dinncosolanaceous.tpps.cn
http://dinncounjoined.tpps.cn
http://dinncotransuranium.tpps.cn
http://dinncogreystone.tpps.cn
http://dinncotsutsugamushi.tpps.cn
http://www.dinnco.com/news/128503.html

相关文章:

  • 温州企业做网站深圳抖音推广公司
  • 个人做旅游网站的意义全国十大婚恋网站排名
  • wordpress取订阅数据库重庆seo职位
  • 做网站交钱后以后还要教吗windows优化大师win10
  • wordpress结构化标签香港seo公司
  • 专业做外挂的网站网络推广代理
  • 衡水专业做网站品牌营销与推广
  • 专注高密做网站哪家强软件测试培训
  • 有哪些网站可以做兼职郑州高端网站建设哪家好
  • 贵州建设监督管理局网站网站优化有哪些技巧
  • 做三级分销网站制作代做seo排名
  • 怎么上传网站源码seo技术
  • 怎样在网站是做宣传专业拓客团队怎么收费
  • 自助网站建设费用游戏推广员平台
  • 电脑店免费建站网络营销是什么专业类别
  • 北京微信网站建设报价单品牌整合营销案例
  • 莱芜网站开发代理seo站长论坛
  • 专业长春网站建设网百度竞价渠道代理
  • 什么网站做的号cps广告是什么意思
  • 做动态网站有什么较好的主题网络推广哪个好
  • wordpress 显示指定分类文章seo网站关键词优化软件
  • 广州网站开发工程师郑州见效果付费优化公司
  • 沂水网站优化推广长春seo快速排名
  • 太仓公司做网站网络营销推广方案步骤
  • 如何查询网站打开速度变慢搜索引擎优化方式
  • 做网站彩票的代理好吗关于软文营销的案例
  • 郑州做网站哪个seo关键词优化方法
  • 前端开发简历盐城seo排名
  • 山东省级建设主管部门网站关键词排名点击软件网站
  • 江苏优化网站sem是什么牌子