码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:其他好文   时间:2015-03-15 13:43:07    阅读次数:134
构造函数实例
package com.java1234.chap03.sec04;public class People { //string类的默认值是null private String name; //int类属性默认值是0; private int age; ...
分类:其他好文   时间:2015-03-15 13:35:44    阅读次数:110
HDU 4681 String(DP)
题目大意: 给出三个字符串A, B, C,求最长的字符串D,使得D是A,B的公共子序列并且C是D的连续子串。 解题思路:  预处理出A,B字符串的正向和反向公共子序列。然后枚举字符串C在A,B中出现的位置起点和终点,则ans为起点左边的最长公共子序列加上字符串C的长度加上起点右边的最长公共子序列。 #include #include #include #include #inclu...
分类:其他好文   时间:2015-03-15 12:28:35    阅读次数:121
C++ STL 简单记录
1,STL提供三种类型的组件:容器、迭代器、算法。容器:顺序容器(vector、list、deque、string等)是一系列元素的有序集合;关联容器(set、multiset、map、multimap)包含查找元素的键值。迭代器:作用是遍历容器。 for (vector::iterator ...
分类:编程语言   时间:2015-03-15 10:48:14    阅读次数:147
1093. Count PAT's (25)想法题吧,算是排列组合吧
1093. Count PAT's (25) 时间限制 120 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CAO, Peng The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th,...
分类:其他好文   时间:2015-03-15 09:37:43    阅读次数:1024
1092. To Buy or Not to Buy (20)建立查询表,或者叫哈希表
1092. To Buy or Not to Buy (20) 时间限制 100 ms 内存限制 65536 kB 代码长度限制 16000 B 判题程序 Standard 作者 CHEN, Yue Eva would like to make a string of beads with her favorite colors so she went to a smal...
分类:其他好文   时间:2015-03-15 09:32:25    阅读次数:138
acm2022
import java.util.*; public class acm2022 { public static void main(String[] args) { Scanner in = new Scanner(System.in); while (in.hasNext()) { int m = in.nextInt(); int n = in.nextInt(); i...
分类:其他好文   时间:2015-03-15 09:32:24    阅读次数:150
C++生成libsvm训练使用数据文件格式
编写一个C++程序来实现将原始的目标特征向量数据转化成libsvm可以使用的数据格式。...
分类:编程语言   时间:2015-03-15 09:32:00    阅读次数:281
[LeetCode] Scramble String -- 三维动态规划的范例
(Version 0.0)作为一个小弱,这个题目是我第一次碰到三维的动态规划。在自己做的时候意识到了所谓的scramble实际上有两种可能的类型,一类是在较低层的节点进行的两个子节点的对调,这样的情况如果我们从第一层切分点,或者说从较高层的切分点看的话,s1和s2切分点左边的子串所包含的字符的种类个...
分类:其他好文   时间:2015-03-15 07:06:17    阅读次数:117
[LeetCode] Maximal Rectangle
(Version 0.1)在做这道题之前,我刚刚做了Scramble String(http://www.cnblogs.com/icecreamdeqinw/p/4338731.html),所以Maximal Rectangle这道题拿来之后我的想法自然跟着惯性觉得肯定是可以用一个三维DP的解法做...
分类:其他好文   时间:2015-03-15 07:05:10    阅读次数:145
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!