码迷,mamicode.com
首页 >  
搜索关键字:15-puzzle problem    ( 37568个结果
面试题31
https://leetcode-cn.com/problems/zhan-de-ya-ru-dan-chu-xu-lie-lcof/ 这个题如果借栈来做的话,简直就是秒杀,但是我这里用了一个不借助栈的方法来实现。 class Solution { public boolean validateSt ...
分类:其他好文   时间:2020-05-05 19:44:37    阅读次数:56
数岛屿
47个用例过了42 ,用了一个图色彩的方法,标记图书,然后调过,调用栈过长,肯能要优化一下 附录GDB 调试的源码 #include <vector> #include<iostream> using namespace std; class Solution { bool Inmap(int i ...
分类:其他好文   时间:2020-05-05 17:43:17    阅读次数:72
Identity Server introspect
IdentityServer document is not write clear on this part. so it really confuse me and put me on several hours to resovle this problem. 1. 我的Identity Se ...
分类:其他好文   时间:2020-05-05 17:37:21    阅读次数:89
跳跃游戏
给定一个非负整数数组,你最初位于数组的第一个位置。 数组中的每个元素代表你在该位置可以跳跃的最大长度。 你的目标是使用最少的跳跃次数到达数组的最后一个位置。 示例: 输入: [2,3,1,1,4]输出: 2解释: 跳到最后一个位置的最小跳跃数是 2。 从下标为 0 跳到下标为 1 的位置,跳 1 步 ...
分类:其他好文   时间:2020-05-05 00:51:13    阅读次数:58
codeforces-1348-D Phoenix and Science
codeforces-1348-Phoenix and Science 传送门:https://codeforces.com/contest/1348/problem/D 题意:最初有一个质量为1的细胞,白天,任意数量的细胞可以分裂成两半,晚上,每个细胞的质量都会加一,问你多少天能正好让细胞的质量和 ...
分类:其他好文   时间:2020-05-05 00:46:18    阅读次数:63
59. 最接近的三数之和
59. 最接近的三数之和 中文English 给一个包含 n 个整数的数组 S, 找到和与给定整数 target 最接近的三元组,返回这三个数的和。 样例 例1: 输入:[2,7,11,15],3 输出:20 解释: 2+7+11=20 例2: 输入:[-1,2,1,-4],1 输出:2 解释: - ...
分类:其他好文   时间:2020-05-05 00:42:05    阅读次数:75
A Simple Problem with Integers POJ - 3468 (区间修改+区间查询)
A Simple Problem with Integers POJ - 3468 You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation ...
分类:其他好文   时间:2020-05-05 00:23:29    阅读次数:80
树状数组 P1908 逆序对
题目 https://www.luogu.com.cn/problem/P1908 题目分析 树状数组的使用原因 可以开一个数组c[maxn],来记录前面数据的出现情况,初始化为0;当数据a出现时,就令c[a]=1。这样的话,欲求某个数a的逆序数,只需要算出在当前状态下c[a+1,maxn]中有多少 ...
分类:编程语言   时间:2020-05-04 21:42:08    阅读次数:95
Codeforces Round #637 (Div. 2) 题解
A. Nastya and Rice 网址:https://codeforces.com/contest/1341/problem/A Nastya just made a huge mistake and dropped a whole package of rice on the floor. ...
分类:其他好文   时间:2020-05-04 21:28:22    阅读次数:77
[每日一题]:最大子矩阵和
题目: 一个M N的矩阵,找到此矩阵的一个子矩阵,并且这个子矩阵的元素的和是最大的,输出这个最大的值。 例如:3 3的矩阵: 1 3 1 2 1 3 3 1 2 和最大的子矩阵是: 3 1 1 3 1 2 题目链接: https://www.51nod.com/Challenge/Problem.h ...
分类:其他好文   时间:2020-05-04 21:14:45    阅读次数:48
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!