Processing math: 100%

11 2018 档案

摘要:一、题目 http://poj.org/problem?id=3126 二、分析 该题主要是要让我们找到一个4位素数到另一个4位素数的最少的变换次数,且要求保证每一次变换都满足 1.下一个数必须是4位。 2.下一个数必须是素数。 知道满足这两个条件后,然后结合BFS即可求出解。 这里有个 阅读全文
posted @ 2018-11-30 10:52 Dybala21 阅读(77) 评论(0) 推荐(0) 编辑
摘要:一、题面 You are given two pots, having the volume of A and B liters respectively. The following operations can be performed: FILL(i) fill the pot i (1 ≤ 阅读全文
posted @ 2018-11-26 22:41 Dybala21 阅读(162) 评论(0) 推荐(0) 编辑
摘要:一、题面 略 二、题意分析 一个迷宫中,有一个人Joe和一个或多个起火点,起火点可以蔓延,人可以走动,都只能走4个方向,问人能走出去的最少步数,如果不能输出不可能。很多大佬说是两遍BFS,先一遍火,记录所有火蔓延到次位置的时间,然后再一遍BFS,让Joe去走,只要满足他到该点时,火还未蔓延至此就可以 阅读全文
posted @ 2018-11-24 20:36 Dybala21 阅读(107) 评论(0) 推荐(0) 编辑
摘要:一、题目 Given an integer n, Chiaki would like to find three positive integers x, y and z such that: n=x+y+z, xn, yn, zn 阅读全文
posted @ 2018-11-08 18:35 Dybala21 阅读(171) 评论(0) 推荐(0) 编辑
摘要:一、题面 You want to form a target string of lowercase letters. At the beginning, your sequence is target.length '?' marks. You also have a stamp of lower 阅读全文
posted @ 2018-11-08 15:06 Dybala21 阅读(423) 评论(0) 推荐(0) 编辑
摘要:一、题面 一、题面 在给定的二维二进制数组 A 中,存在两座岛。(岛是由四面相连的 1 形成的一个最大组。) 现在,我们可以将 0 变为 1,以使两座岛连接起来,变成一座岛。 返回必须翻转的 0 的最小数目。(可以保证答案至少是 1。) 示例 1: 输入:[[0,1],[1,0]] 输出:1 示例 阅读全文
posted @ 2018-11-05 09:35 Dybala21 阅读(424) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示