码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
Aizu 1296 简单bfs
题目链接:http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1296 题意: 给出一些个替换模式, 问将原始串通过替换得到目标串所需要的最小的替换次数是多少。 思路:由于数据规模很小(n 通过这道题,熟悉一下string还有map的使用还是很不错的。 code: #include #include #include ...
分类:其他好文   时间:2015-03-07 11:35:38    阅读次数:127
java爬取百度首页logo
两个方法一个获得Url的网页源代码getUrlContentString,另外一个从源代码中得到想要的地址片段,其中需要用到正则表达式去匹配得到网页源代码的过程:地址为string,将地址转换为java中的url对象url的openConnection方法返回urlConnectionurlConn...
分类:编程语言   时间:2015-03-07 11:29:46    阅读次数:137
写文件
public Boolean SaveDataToRom(String name, String pwd){ Boolean flag = false; try{ String content = name+":"+pwd; ...
分类:其他好文   时间:2015-03-07 11:25:00    阅读次数:134
Kmp 算法模板 C
/** * name:KMP * time:2012-11-22 * 字符串快速匹配 */#include#includetypedef struct seqstring{ char string[100]; int length;}seqstring;void getnext(seqstring ...
分类:编程语言   时间:2015-03-07 11:19:48    阅读次数:264
简单四则运算的随机输入
java练习课堂练习题目,随机输入一个简单的四则运算,符号也随机,不输出结果。代码: 1 public static void main(String[] args) { 2 // TODO Auto-generated method stub 3 Strin...
分类:其他好文   时间:2015-03-07 07:29:06    阅读次数:155
VMware coding Challenge: Coin Toss Betting
1 static int CoinTossEndAmount(int betAmount, String coinTossResults) { 2 if (betAmount <=0 || coinTossResults.length() == 0) return betA...
分类:系统相关   时间:2015-03-07 06:14:58    阅读次数:164
Python 学习 DAY1(still)
s3 Strings and o console utput1Python里面还有一种好的数据类型是String2 一个String是通过'' 或者 ""包成的串3Python是通过\来实现转义字符的4我们可以使用""来避免转义字符的出现 练习: 把变量letter设置为MONTY的第五个字符5 ....
分类:编程语言   时间:2015-03-07 06:11:19    阅读次数:218
Letter Combinations of a Phone Number
Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters (just like on the telephone buttons) is given below. Input:Digit string...
分类:其他好文   时间:2015-03-07 01:02:15    阅读次数:210
JDBC的进化3
这次进化完成后,JDBC的进化就需要设置一个savepoint了,然后提交一下,提交到我们的脑袋硬盘中。 上一次说到了利用Statement对象来发送sql语句到数据库。然而这样的话,会暴露出两个问题。 那么问题来了!!! 问题1: 在执行executeUpdate(String sql)和executeQuery(String sql)方法时,我们需要拼写sql字符串,就像下面这样:Str...
分类:数据库   时间:2015-03-06 23:41:02    阅读次数:458
leetcode
代码:(Time Limit Exceeded),这博客已经被我写成我的刷题实况了。接下来还有新的写法。 1 #include 2 #include 3 4 using namespace std; 5 6 string longestPalindrome(string s) 7 { 8 ...
分类:其他好文   时间:2015-03-06 23:36:18    阅读次数:150
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!