题目大意:判断两个字符串是否等价。
等价的条件(任意一条满足即可):1、两个字符串完全相同
2、把每个字符串分成长度相同的两部分,若a1等价于b1并且a2等价于b2,或者a1等价于b2并且a2等价于b1
由于等价的条件说得很模糊,我卡了不久。等价条件里的第2条的意思是,如果ab两个字符串的两两子串都满足这两个条件,那么ab是等价的(有点绕,对吧),如果我们都已经解读清楚这句话了,显然...
分类:
其他好文 时间:
2015-08-07 19:55:26
阅读次数:
108
Power StringsDescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef"...
分类:
其他好文 时间:
2015-08-07 18:53:14
阅读次数:
83
Power Strings
Time Limit: 3000MS
Memory Limit: 65536K
Total Submissions: 37379
Accepted: 15443
Description
Given two strings a and b we define a*b to be their concatena...
分类:
其他好文 时间:
2015-08-07 13:22:56
阅读次数:
97
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega...
分类:
编程语言 时间:
2015-08-07 12:49:07
阅读次数:
120
1、我们的app一般默认的名字是我们的工程名字,所以我们一般会更改一个更加友好的名字,更改的方法如下图:找到InfoPlist.strings文件,在里面添加语句CFBundleDisplayName="你的APP的名字";2、关于怎么设置图标选中你的工程的名字(图上1位置),然后向下拉,找到APP...
分类:
移动开发 时间:
2015-08-07 09:29:06
阅读次数:
143
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".Solution:二进制加法,和为2进1,和为3进1留1; 1 class Solution ...
分类:
其他好文 时间:
2015-08-07 00:22:07
阅读次数:
354
一,过滤package mainimport ( "flag" "fmt" "log" "os" "path/filepath" "runtime" "strings")func main() { runtime.GOMAXPROCS(runtime....
分类:
编程语言 时间:
2015-08-07 00:12:05
阅读次数:
142
题目Write a function to find the longest common prefix string amongst an array of strings.分析该题目是求一个字符串容器中所有字符串的最长公共前缀。AC代码class Solution {
public:
string longestCommonPrefix(vector& strs) {...
分类:
其他好文 时间:
2015-08-06 17:02:30
阅读次数:
168
Compare two version numbers version1 and version2.
If version1 > version2 return 1, if version1 version2 return -1, otherwise return 0.
You may assume that the version strings are non-empty and co...
分类:
其他好文 时间:
2015-08-06 13:24:04
阅读次数:
85
1.在目录res/xml下新建文件perferences.xml,在strings配置文件中给变量赋值:
pref_sync
pref_sync_summ
pref_syncConnectionType
pref_syncConnectionTypes_default
长沙
岳阳
株洲
湘潭
...
分类:
移动开发 时间:
2015-08-06 11:16:00
阅读次数:
136