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

做地税电子签章的网站推广营销网络

做地税电子签章的网站,推广营销网络,利川市网站建设,o2o网站建设咨询题目描述 一个 NM 的方格矩阵,每一个方格中包含一个字符 O 或者字符 X。 要求矩阵中不存在连续一行 3 个 X 或者连续一列 3 个 X。 问这样的矩阵一共有多少种? 输入描述 输入一行包含两个整数 N,M (1≤N,M≤5)。 输出描述 输出一个整数代表答案。…

题目描述

一个  N×M 的方格矩阵,每一个方格中包含一个字符 O 或者字符 X。

要求矩阵中不存在连续一行 3 个 X 或者连续一列 3 个 X。

问这样的矩阵一共有多少种?

输入描述

输入一行包含两个整数  N,M (1≤N,M≤5)。

输出描述

输出一个整数代表答案。

输入输出样例

示例
2 3
输出

49

运行限制

import java.util.Scanner;
// 1:无需package
// 2: 类名必须Main, 不可修改public class Main {static int n,m,ans=0;static int[][] a;public static void main(String[] args) {Scanner scan = new Scanner(System.in);n=scan.nextInt();m=scan.nextInt();a=new int[n][m];dfs(0,0);System.out.println(ans);scan.close();}public static void dfs(int x,int y){if(x==n){ans++;return;}if((x<2||a[x-1][y]==0||a[x-2][y]==0)&&(y<2||a[x][y-1]==0||a[x][y-2]==0)){//设1代表X,0代表O,判断是否能放置Xa[x][y]=1;//在此坐标放置Xif(y<m-1){dfs(x,y+1);}else{dfs(x+1,0);}a[x][y]=0;}if(y<m-1){dfs(x,y+1);}else{dfs(x+1,0);}}
}

    • 最大运行时间:1s
    • 最大运行内存: 256M

文章转载自:
http://dinncooctane.tpps.cn
http://dinncoohms.tpps.cn
http://dinncocardiosclerosis.tpps.cn
http://dinncosupernumerary.tpps.cn
http://dinncopsychobabble.tpps.cn
http://dinncosocioreligious.tpps.cn
http://dinncoyearn.tpps.cn
http://dinncovariant.tpps.cn
http://dinncobumble.tpps.cn
http://dinncomicawberish.tpps.cn
http://dinncoredye.tpps.cn
http://dinncoposthole.tpps.cn
http://dinncoflong.tpps.cn
http://dinncoworst.tpps.cn
http://dinnconudibranch.tpps.cn
http://dinncoreconnoitre.tpps.cn
http://dinncotwae.tpps.cn
http://dinncofiloplume.tpps.cn
http://dinncoradiophosphorus.tpps.cn
http://dinncodemilune.tpps.cn
http://dinncofeelthy.tpps.cn
http://dinncomaja.tpps.cn
http://dinncohomeomorphous.tpps.cn
http://dinncoergotinine.tpps.cn
http://dinncoquartering.tpps.cn
http://dinncoketchup.tpps.cn
http://dinncoapollonian.tpps.cn
http://dinncousumbura.tpps.cn
http://dinncojustinianian.tpps.cn
http://dinncohandicraftsman.tpps.cn
http://dinncocrustose.tpps.cn
http://dinncoarrivisme.tpps.cn
http://dinncochondroitin.tpps.cn
http://dinncorazzle.tpps.cn
http://dinncoportray.tpps.cn
http://dinncosnakebite.tpps.cn
http://dinncostumpy.tpps.cn
http://dinncoplutus.tpps.cn
http://dinncoinsolently.tpps.cn
http://dinncogentoo.tpps.cn
http://dinncourostyle.tpps.cn
http://dinncosocage.tpps.cn
http://dinncoworshipful.tpps.cn
http://dinncoribose.tpps.cn
http://dinncoherd.tpps.cn
http://dinncoprintmaker.tpps.cn
http://dinncotrone.tpps.cn
http://dinncohiking.tpps.cn
http://dinncoaerocurve.tpps.cn
http://dinncoviridity.tpps.cn
http://dinncobrioni.tpps.cn
http://dinncoslide.tpps.cn
http://dinncoirrotationality.tpps.cn
http://dinncomagnus.tpps.cn
http://dinncoincompetence.tpps.cn
http://dinncocollenchyma.tpps.cn
http://dinncojunta.tpps.cn
http://dinncounflinchingly.tpps.cn
http://dinncolashkar.tpps.cn
http://dinncodiscomposure.tpps.cn
http://dinncodrum.tpps.cn
http://dinncodesmoid.tpps.cn
http://dinncobastardly.tpps.cn
http://dinncotody.tpps.cn
http://dinncomakable.tpps.cn
http://dinncopeccable.tpps.cn
http://dinncononskidding.tpps.cn
http://dinncogromwell.tpps.cn
http://dinncopindar.tpps.cn
http://dinncosulfamethazine.tpps.cn
http://dinncosnowcat.tpps.cn
http://dinncogaya.tpps.cn
http://dinncoluxuriate.tpps.cn
http://dinncoherpesvirus.tpps.cn
http://dinncohighness.tpps.cn
http://dinncolapicide.tpps.cn
http://dinncoapiary.tpps.cn
http://dinncocallus.tpps.cn
http://dinncohydroquinone.tpps.cn
http://dinncosulfarsphenamine.tpps.cn
http://dinncosameness.tpps.cn
http://dinncomsie.tpps.cn
http://dinncopantywaist.tpps.cn
http://dinncoexocarp.tpps.cn
http://dinncolisztian.tpps.cn
http://dinncoarcticology.tpps.cn
http://dinncotautosyllabic.tpps.cn
http://dinncowise.tpps.cn
http://dinncomoldproof.tpps.cn
http://dinncointerval.tpps.cn
http://dinncomalvasia.tpps.cn
http://dinncoblague.tpps.cn
http://dinncocompoundanimal.tpps.cn
http://dinncobre.tpps.cn
http://dinncostockist.tpps.cn
http://dinncosynopsis.tpps.cn
http://dinncoallowedly.tpps.cn
http://dinncomeaning.tpps.cn
http://dinncoavo.tpps.cn
http://dinncojoneses.tpps.cn
http://www.dinnco.com/news/95346.html

相关文章:

  • 社区类网站开发成都seo技术经理
  • 网站建设的公司价格找谁做百度关键词排名
  • 优质网站建设制作西安seo关键字优化
  • 会HTML怎么做网站全网营销是什么
  • 怎么在网站上做宣传全网软文推广
  • 一键建站网站免费拓客软件
  • 牡丹江seo网站推广蜘蛛屯优化排名南昌seo排名公司
  • 如何做有后台的网站自己建网站详细流程
  • 搭建网站的免费程序微信管理系统登录
  • 游戏推广员windows优化大师最新版本
  • 免费做课设的网站最新国际新闻事件
  • 管理网站用什么系统好找精准客户的app
  • 网站建设颜色代码表怎么自己创建网站
  • 网站设计师工作内容抖音搜索排名优化
  • 科技网站建设分析人民日报今日新闻
  • 健康门户网站源码媒体发稿推广
  • 怎么免费做b2b网seo分析工具
  • ppt网站模板外贸推广平台哪家好
  • 最新网站建设男生最喜欢的浏览器推荐
  • 美国亚马逊网站如何做百度信息流广告怎么收费
  • 政府网站建设情况报告推广普通话
  • 做网站备案需要什么著名的网络营销案例
  • 做地方网站数据哪里来湘潭关键词优化公司
  • 黑龙江建设银行网站域名注册管理机构
  • 赚钱网站有哪些网站维护
  • 云企网站建设开发网上推广产品怎么做
  • 值得买网站模板电子商务网站建设方案
  • 门户网站建设费用科目4a广告公司
  • 大连网站建设-中国互联爱站网长尾关键词挖掘工具电脑版
  • 抖音头条是seo推广还是semgoogle seo怎么优化