基本操作//输出Console.WriteLine("这是一行文字");自动回车。Console.write("Helloworld");不带回车。注意:1.大小写敏感。(快捷键Alt+→)2.括号,引号,分号都是英文状态下的符号。3结尾不要忘记写分号。//输入strings=Console.Rea...
分类:
其他好文 时间:
2014-12-21 20:33:15
阅读次数:
178
题目:
Write a function to find the longest common prefix string amongst an array of strings.
第一种解决方案:
public class Solution {
public String longestCommonPrefix(String[] strs) {
int st...
分类:
其他好文 时间:
2014-12-20 23:32:55
阅读次数:
341
You have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Be...
分类:
其他好文 时间:
2014-12-19 23:22:54
阅读次数:
228
Write a function to find the longest common prefix string amongst an array of strings.
方法一,单个字符横向全体比较,纵向逐个的收集。
class Solution {
public:
string longestCommonPrefix(vector &strs) {
i...
分类:
其他好文 时间:
2014-12-19 15:48:20
阅读次数:
142
题目链接:http://acm.bnu.edu.cn/bnuoj/problem_show.php?pid=34985We define a kind of strings as elegant string: among all the substrings of an elegant strin...
分类:
其他好文 时间:
2014-12-19 14:21:52
阅读次数:
228
Compare two version numbers version1 and version1.
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...
分类:
其他好文 时间:
2014-12-18 20:47:40
阅读次数:
236
1 //Strings.cpp 2 3 /* 4 Copyright 2000-2004 The VCF Project. 5 Please see License.txt in the top level directory 6 where you installed the VC...
分类:
其他好文 时间:
2014-12-18 16:27:30
阅读次数:
162
题目1042:Coincidence
时间限制:1 秒
内存限制:32 兆
特殊判题:否
提交:1689
解决:898
题目描述:
Find a longest common subsequence of two strings.
输入:
First and second line of each input case co...
分类:
其他好文 时间:
2014-12-18 01:42:32
阅读次数:
162
Binary String Matching
时间限制:3000 ms | 内存限制:65535 KB
难度:3
描述Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear a...
分类:
其他好文 时间:
2014-12-17 16:35:01
阅读次数:
169
A character string is said to have period k if it can be formed by concatenating one or more repetitions of another string of length k. For example, t...
分类:
其他好文 时间:
2014-12-17 06:42:59
阅读次数:
219