题意,就是根据斜线组成的迷宫,判断能够组成多少个闭环. 解法: 放大俩倍或者三倍 俩倍 \ >10 01 三倍 \ >100 010 001 然后深搜,有个问题,没有判断是否成环,它竟然过了,待证明 它到底对不对 ...
分类:
其他好文 时间:
2017-05-21 19:49:39
阅读次数:
166
Longest Ordered Subsequence Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 38980 Accepted: 17119 Description A numeric sequence of ai is o ...
分类:
其他好文 时间:
2017-05-21 13:47:57
阅读次数:
197
We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1.Now, given an integer array ...
分类:
其他好文 时间:
2017-05-21 12:51:02
阅读次数:
129
原题地址:https://leetcode.com/problems/longest-substring-without-repeating-characters/#/description 没咋么过脑子,瞬间能想到的思路大概为: "abcabcbb"比如这个字符串首先 声明一个数组 里面存放各种开 ...
分类:
其他好文 时间:
2017-05-21 01:07:39
阅读次数:
243
题目: Given a sequence of integers, find the longest increasing subsequence (LIS). You code should return the length of the LIS. Given a sequence of int ...
分类:
其他好文 时间:
2017-05-20 21:13:26
阅读次数:
132
假设一个字符串从左向右写和从右向左写是一样的,这种字符串就叫做palindromic string。如aba,或者abba。本题是这种,给定输入一个字符串。要求输出一个子串,使得子串是最长的padromic string。 下边提供3种思路 1.两側比較法 以abba这样一个字符串为例来看,abba ...
分类:
编程语言 时间:
2017-05-20 00:02:52
阅读次数:
223
题目如下: Given a string, find the length of the longest substring without repeating characters. Examples: Given "abcabcbb", the answer is "abc", which th ...
分类:
其他好文 时间:
2017-05-19 12:58:53
阅读次数:
186
LeetCode Algorithm 原文出处:【LeetCode】 算法参考:【陈皓 coolshell】 3.Longest Substring Without Repeating Characters 3.Longest Substring Without Repeating Characte ...
分类:
其他好文 时间:
2017-05-18 16:56:09
阅读次数:
139
Description Vasya has an array a consisting of positive integer numbers. Vasya wants to divide this array into two non-empty consecutive parts (the pr ...
分类:
其他好文 时间:
2017-05-17 00:55:32
阅读次数:
144
Longest Common Subsequence Accepted : 7 Submit : 66 Time Limit : 3000 MS Memory Limit : 65536 KB Longest Common Subsequence Bobo has a sequence A=(a1,... ...
分类:
其他好文 时间:
2017-05-16 20:46:07
阅读次数:
261