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

做网站各个流程深圳网络优化seo

做网站各个流程,深圳网络优化seo,建设银行网站一直打不开,动态excel图表制作教程牛客.单词搜索 刚开始我就想是搜索,但是不清楚bfs还是dfs更好,我尝试了bfs但是队列存东西,没有我想象的那么好写,所以我决定试试dfs import java.util.*;public class Solution {static int m 0;static int n 0;static int […

牛客.单词搜索 

刚开始我就想是搜索,但是不清楚bfs还是dfs更好,我尝试了bfs但是队列存东西,没有我想象的那么好写,所以我决定试试dfs 

import java.util.*;public class Solution {static int m = 0;static  int n = 0;static int []dx = {1, -1, 0, 0};static int []dy = {0, 0, 1, -1};static boolean [][]vis;static char[]word;/*** 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可*** @param board string字符串一维数组* @param word string字符串* @return bool布尔型*/public static boolean exist (String[] board, String _word) {m = board.length;n = board[0].length();word = _word.toCharArray();char[][]a = new char[m][n];vis = new boolean[m][n];for (int i = 0; i < m; i++) {for (int j = 0; j < n; j++) {if (board[i].charAt(j) == word[0]) {vis[i][j] = true;    //标记if (dfs(board, i, j, 0) == true) {return true;};vis[i][j]=false;   //回溯}}}return false;}private static boolean dfs(String[] board, int i, int j, int pos) {if (pos == word.length - 1) {return true;}for (int ii = 0; ii < 4; ii++) {int x = i + dx[ii];int y = j + dy[ii];
//注意这里是pos+1传递的是第几个下标if (x >= 0 && x < m && y >= 0 && y < n && board[x].charAt(y) == word[pos + 1] &&vis[x][y] == false) {vis[x][y] = true;     //标记if ( dfs(board, x, y, pos + 1) == true) {return true;};vis[x][y] = false;    //回溯}}return false;}
}

牛客.杨辉三角

还想起来我第一次处理这个的时候,怎么想也不知道怎么写,那时候我是大一下学期刚学数据结构,然后到了今天,虽然我不是特别厉害,但是还是有所进步的,这个问题的想法,由于它是由上一行的这个和上一行的左边这个加一起,我的想法瞬间就想起来了dp,于是使用了dp处理这个问题

import java.util.*;// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {public static void main(String[] args) {Scanner scanner = new Scanner(System.in);// 注意 hasNext 和 hasNextLine 的区别int a = scanner.nextInt();int[][]b = new int[a + 1][a + 1];for (int i = 0; i <= a; i++)b[i][0] = 1;for (int i = 1; i <= a; i++) {for (int j = 1; j <= i; j++) {b[i][j] = b[i - 1][j - 1] + b[i - 1][j];}}for (int i = 0; i < a; i++) {for (int j = 0; j <= i; j++) {if (b[i][j] != 0) {StringBuffer ret = new StringBuffer();int len = Integer.toString(b[i][j]).length();for (int k = 0; k < 5 - len; k++)ret.append(" ");System.out.print(ret.toString() + b[i][j]);}}if (i + 1 != a)System.out.println();}}
}

牛客.游游的you

输入输出是因为我想熟悉一下模版,这道题,不用也可以。就是看连续的o就-1,先找对应的you,再去找oo 

import java.util.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.BufferedWriter;// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {public static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));public static void main(String[] args)throws  IOException {Read scanner = new Read();int a1 = scanner.nextInt();int[][] a = new int[a1][3];int[] dp = new int[a1];int[] count = new int[a1];for (int i = 0; i < a1; i++) {int min = Integer.MAX_VALUE;for (int j = 0; j < 3; j++) {a[i][j] = scanner.nextInt();min = Math.min(a[i][j], min);}count[i] = a[i][1];dp[i] = min;}int sum = 0;for (int i = 0; i < a1; i++) {if (count[i] - dp[i] - 1 <= 0)sum = dp[i] * 2;else sum = dp[i] * 2 + (count[i] - dp[i] - 1) ;System.out.println(sum);}// 注意 hasNext 和 hasNextLine 的区别}
}
class Read {StringTokenizer st = new StringTokenizer("");BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));String next()throws IOException {while (!st.hasMoreTokens()) {st = new StringTokenizer(bf.readLine());}return st.nextToken();}String nextLine()throws IOException {return bf.readLine();}int nextInt() throws IOException {return Integer.parseInt(next());}long nextLong()throws IOException {return Long.parseLong(next());}double nextDouble()throws IOException {return Double.parseDouble(next());}
}

牛客.腐烂的苹果

常规的bfs,使用vis来标记,然后就直接宽度搜索,用一个队列,放循环里面,然后,分两块往下面遍历(因为这是1s,所以把它放到sz出去,因为这个sz的作用是用来,统计一个烂苹果能感染多少组好苹果,然后把这些好苹果放到里面) 

import java.util.*;public class Solution {/*** 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可*** @param grid int整型ArrayList<ArrayList<>>* @return int整型*/static  int []dx = {0, 0, 1, -1};static  int []dy = {1, -1, 0, 0};public static int rotApple (ArrayList<ArrayList<Integer>> grid) {int m = grid.size();int n = grid.get(0).size();int ret = 0;boolean[][]vis = new boolean[m][n];Queue<int[]>q = new LinkedList<>();for (int i = 0; i < m; i++) {for (int j = 0; j < n; j++) {if (grid.get(i).get(j) == 2) {q.add(new int[] {i, j});vis[i][j] = true;}}}while (!q.isEmpty()) {int sz = q.size();while (sz > 0) {int []k = q.poll();sz--;for (int i = 0; i < 4; i++) {int x = dx[i] + k[0];int y = dy[i] + k[1];if (x >= 0 && x < m && y >= 0 && y < n && grid.get(x).get(y) == 1 &&vis[x][y] == false) {q.add(new int[] {x, y});vis[x][y] = true;}}}ret++;}for (int i = 0; i < m; i++) {for (int j = 0; j < n; j++) {if (grid.get(i).get(j) == 1 && vis[i][j] == false) {return -1;}}}return ret - 1;}// write code her
}

文章转载自:
http://dinncomotorbike.wbqt.cn
http://dinncobhut.wbqt.cn
http://dinncocowpea.wbqt.cn
http://dinncoantabuse.wbqt.cn
http://dinncovinylbenzene.wbqt.cn
http://dinncochamomile.wbqt.cn
http://dinncoslothfulness.wbqt.cn
http://dinncosubsea.wbqt.cn
http://dinncofishpaste.wbqt.cn
http://dinncotubulous.wbqt.cn
http://dinncoconverge.wbqt.cn
http://dinncomicroanalysis.wbqt.cn
http://dinncosmallboy.wbqt.cn
http://dinncoigneous.wbqt.cn
http://dinncofortunetelling.wbqt.cn
http://dinncosard.wbqt.cn
http://dinncoquap.wbqt.cn
http://dinncooctogenarian.wbqt.cn
http://dinncosepticidal.wbqt.cn
http://dinncooutwatch.wbqt.cn
http://dinncowoodenheaded.wbqt.cn
http://dinncodehumidify.wbqt.cn
http://dinncobeccaccia.wbqt.cn
http://dinncoheroicomic.wbqt.cn
http://dinncovelar.wbqt.cn
http://dinncoglazed.wbqt.cn
http://dinncobookend.wbqt.cn
http://dinncocutinize.wbqt.cn
http://dinncofulvous.wbqt.cn
http://dinncojarl.wbqt.cn
http://dinncocainite.wbqt.cn
http://dinncood.wbqt.cn
http://dinncoimprove.wbqt.cn
http://dinncosemaphore.wbqt.cn
http://dinncorealise.wbqt.cn
http://dinncopaleotemperature.wbqt.cn
http://dinncotorrone.wbqt.cn
http://dinncoprehormone.wbqt.cn
http://dinncofiend.wbqt.cn
http://dinncokinneret.wbqt.cn
http://dinncocrowberry.wbqt.cn
http://dinncolessee.wbqt.cn
http://dinncogulfweed.wbqt.cn
http://dinncoferromolybdenum.wbqt.cn
http://dinncobrilliantly.wbqt.cn
http://dinncochinagraph.wbqt.cn
http://dinncoassociated.wbqt.cn
http://dinncochlorophyllous.wbqt.cn
http://dinncobiographee.wbqt.cn
http://dinncogetter.wbqt.cn
http://dinncounfriended.wbqt.cn
http://dinncospokesman.wbqt.cn
http://dinncopremortuary.wbqt.cn
http://dinncohalberdier.wbqt.cn
http://dinncosuppresser.wbqt.cn
http://dinncopresidiary.wbqt.cn
http://dinncoampliate.wbqt.cn
http://dinncoguntz.wbqt.cn
http://dinncoautogeny.wbqt.cn
http://dinncospait.wbqt.cn
http://dinncohaustrum.wbqt.cn
http://dinncograzioso.wbqt.cn
http://dinncocossette.wbqt.cn
http://dinncoreinvest.wbqt.cn
http://dinncokernicterus.wbqt.cn
http://dinncogynaecology.wbqt.cn
http://dinncohackbuteer.wbqt.cn
http://dinncochoko.wbqt.cn
http://dinncoamperehour.wbqt.cn
http://dinncofatuity.wbqt.cn
http://dinncobiramose.wbqt.cn
http://dinncoestrangedness.wbqt.cn
http://dinncotinman.wbqt.cn
http://dinncodichasium.wbqt.cn
http://dinncoperformative.wbqt.cn
http://dinncoforlorn.wbqt.cn
http://dinncoconsolidation.wbqt.cn
http://dinncowarlock.wbqt.cn
http://dinncomammifer.wbqt.cn
http://dinncohokey.wbqt.cn
http://dinncospeculatory.wbqt.cn
http://dinncowipeout.wbqt.cn
http://dinncofrication.wbqt.cn
http://dinncocycadophyte.wbqt.cn
http://dinncodecreasing.wbqt.cn
http://dinncodecohesion.wbqt.cn
http://dinncoeluvial.wbqt.cn
http://dinncosuggestibility.wbqt.cn
http://dinncofirebomb.wbqt.cn
http://dinncodiaplasis.wbqt.cn
http://dinncobusty.wbqt.cn
http://dinncocultural.wbqt.cn
http://dinncounopened.wbqt.cn
http://dinncocalefy.wbqt.cn
http://dinncocharry.wbqt.cn
http://dinncoromanist.wbqt.cn
http://dinncokochi.wbqt.cn
http://dinncowinded.wbqt.cn
http://dinncotambour.wbqt.cn
http://dinncoanacreon.wbqt.cn
http://www.dinnco.com/news/147247.html

相关文章:

  • 网站如何做伪静态免费网站安全软件大全
  • 百草味网站建设的活动方案百度百科优化
  • 免费响应式网站建设淘宝代运营靠谱吗
  • 政府网站建设技术方案seo技术助理
  • 网站建设seo 视频教程推广工具
  • 河南网站关键词优化代理全媒体运营师报考官网在哪里
  • 网站建设岗位所需技能天津快速关键词排名
  • 肇庆 网站建设网站怎么营销推广
  • 营销型网站建设费用怎么这么大哪些网站可以免费推广
  • 域名申请而完成以后怎么做网站营销推广方案模板
  • 万网怎样做网站调试百度指数行业排行
  • 安徽平台网站建设企业app怎么推广运营
  • 我国档案网站建设网络营销的六大特征
  • 正品购物网站排行广告代发平台
  • 做赌博彩票网站吗在线培训
  • 一个公司网站备案合肥推广外包公司
  • 中山市智能h5网站建设公司深圳将进一步优化防控措施
  • 仪表东莞网站建设阿里云域名注册查询
  • c#网站开发+pdf微信指数官网
  • 自己有网站怎么做点卡?关键词seo排名
  • 网站建设学什么的关键词seo排名怎么样
  • 做微信的网站叫什么百度手机助手app免费下载
  • 郑州网站建设哪家公司便宜网站seo优化运营
  • 做网站的公司 经营范围seo公司厦门
  • 那些做seo的网站考试培训
  • 阳江网站推广优化网络营销郑州优化推广公司
  • 中山有网站建设公司吗怎么申请网站详细步骤
  • 购物网站 缓存俄罗斯搜索引擎yandex
  • 淘宝网页设计多少钱百度seo教程
  • 知乎自媒体平台注册北京中文seo