输入一个字符串,判断是否含有相同的子串(字串长度大于1),是输出1,否,输出0。
例如12312含有两个12,所以输出1;23456则没有相同子序列,输出0.
输入:12312
输出:1
#include
#include
using namespace std;
int main(int argc, char *argv[])
{
string s;
cin>...
分类:
其他好文 时间:
2015-01-06 00:51:48
阅读次数:
198
输入一个字符串,去掉重复出现的字符,并把剩余的字符串排序输出。
#include
#include
using namespace std;
int main(int argc, char *argv[])
{
string s;
while(cin>>s)
{
for(int i=0;i<s.size();++i)
for(i...
分类:
编程语言 时间:
2015-01-06 00:51:40
阅读次数:
232
#include
#include
#include
#include
#include
int main (int argc, char *argv[])
{
typedef int KeyType;
typedef float MappedType;
typedef std::pair ValueType;
typedef boost::interp...
分类:
其他好文 时间:
2015-01-05 20:32:30
阅读次数:
511
输入多个字符串,分别提取出里面的数字,排序输出所有的数字。
#include
#include
#include
#include
#include
using namespace std;
vectorvec;
int main(int argc, char *argv[])
{
int n;
string s;
while(cin>>n)
{...
分类:
编程语言 时间:
2015-01-05 00:36:07
阅读次数:
206
输入一个字符串,输出出现次数最少,或者说出现频率最小的字符。
#include
#include
#include
#include
#include
using namespace std;
int main(int argc, char *argv[])
{
string s;
cin>>s;
mapm;
for(string::size_type i=0...
分类:
其他好文 时间:
2015-01-05 00:34:23
阅读次数:
174
1 #include 2 3 int binarySearch(int *array, int length, int num); 4 int main(int argc, const char * argv[]) { 5 6 int array[] = {1, 2, 3, ...
分类:
编程语言 时间:
2015-01-04 21:15:04
阅读次数:
163
#include int fatorialWithNum(int num);int main(int argc, const char * argv[]) { @autoreleasepool { int result = fatorialWithNum(6); ...
分类:
其他好文 时间:
2015-01-04 17:03:11
阅读次数:
135
1 #include 2 3 void bubbleAlgorithmSort(int array[], int arrayCount); 4 int main(int argc, const char * argv[]) { 5 6 int array[] = {1,3,2,...
分类:
编程语言 时间:
2015-01-04 17:00:07
阅读次数:
196
gcc编译C++程序单个源文件生成可执行程序下面是一个保存在文件 helloworld.cpp 中一个简单的 C++ 程序的代码:/* helloworld.cpp */#include int main(int argc,char *argv[]){ std::cout class Speak{ ...
分类:
编程语言 时间:
2015-01-04 16:58:10
阅读次数:
190
版本:2.x
平台iso
先看mian.m文件
//创建一个iso应用
int retVal = UIApplicationMain(argc, argv,
nil, @"AppController");
iOS系统会调用AppController 的 didFinishLaunchingWithOptions函数,里面做了一些创建界面的东西
该函数内部有如下代码;
coc...
分类:
其他好文 时间:
2015-01-04 15:21:40
阅读次数:
640