上一页 1 ··· 9 10 11 12 13

2020年1月13日

H - 二分+交互 Gym - 101375H

摘要: H - 二分+交互 Gym - 101375H Obs: this is an interactive problem. More information is under the "Interaction" section. MaratonIME is gathering to start ano 阅读全文

posted @ 2020-01-13 21:56 Aminers 阅读(142) 评论(0) 推荐(0) 编辑

I - 二分 HYSBZ - 1734

摘要: I - 二分 HYSBZ - 1734 Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along a straight line at position 阅读全文

posted @ 2020-01-13 20:40 Aminers 阅读(104) 评论(0) 推荐(0) 编辑

F - BFS/DFS POJ - 1426

摘要: F - BFS/DFS POJ - 1426 给定一个正整数n,请编写一个程序来寻找n的一个非零的倍数m,这个m应当在十进制表示时每一位上只包含0或者1。你可以假定n不大于200且m不多于100位。 提示:本题采用Special Judge,你无需输出所有符合条件的m,你只需要输出任一符合条件的m即 阅读全文

posted @ 2020-01-13 11:05 Aminers 阅读(93) 评论(0) 推荐(0) 编辑

L - 二分??? CodeForces - 1260B

摘要: L - 二分??? CodeForces - 1260B You are given two integers aa and bb. You may perform any number of operations on them (possibly zero). During each opera 阅读全文

posted @ 2020-01-13 10:32 Aminers 阅读(112) 评论(0) 推荐(0) 编辑

A - 尺取 POJ - 3061

摘要: A - 尺取 POJ - 3061 A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 0 阅读全文

posted @ 2020-01-13 09:34 Aminers 阅读(116) 评论(0) 推荐(0) 编辑

C - DFS/BFS POJ - 1979

摘要: C - DFS/BFS POJ - 1979 There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black 阅读全文

posted @ 2020-01-13 01:04 Aminers 阅读(156) 评论(0) 推荐(0) 编辑

B - DFS/BFS POJ - 2386

摘要: B - DFS/BFS POJ - 2386 Due to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 阅读全文

posted @ 2020-01-13 00:47 Aminers 阅读(110) 评论(0) 推荐(0) 编辑

G - BFS Gym - 101755H

摘要: 题目:G - BFS Gym - 101755H You play a new RPG. The world map in it is represented by a grid of n × m cells. Any playing character staying in some cell c 阅读全文

posted @ 2020-01-13 00:31 Aminers 阅读(106) 评论(0) 推荐(0) 编辑

2019年12月26日

用图片理解dfs和bfs

摘要: 恢复内容开始 我们常听过广搜,深搜。那么他们到底是什么呢? 深搜就是深度优先的搜索方式,简称dfs。广搜就是宽度优先的搜索方式,简称bfs。 *1.下面让我们先来看一下深度搜索,也就是dfs。 先给出最初的定义: 一dfs遍历二叉树: 从根开始一直向下搜索,就像树根一直向下生长一样。直到搜到最底,就 阅读全文

posted @ 2019-12-26 13:51 Aminers 阅读(361) 评论(0) 推荐(0) 编辑

2019年10月2日

回型矩阵的走法

摘要: 不说废话,先上图 。 实现这个目标,可以把数字想像成一条蛇,蛇爬过的数字就加一。把二维数组[y][x]作为地图,y为纵轴,x为横轴。通过改变蛇的坐标让它爬起来(是不是很像贪吃蛇)。!!先上总代码: 这些都挺简单的对吧,关键是怎么让蛇在我们希望时调头。在这我想先说说我发现的一些规律: (9^2-1)/ 阅读全文

posted @ 2019-10-02 22:21 Aminers 阅读(916) 评论(0) 推荐(0) 编辑

上一页 1 ··· 9 10 11 12 13

导航