要求: 给定一个无序数组arr,求出需要排序的最短子数组长度 1 // getMinLength.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include <iostream> 6 7 using namespace std; 8 9 ...
分类:
编程语言 时间:
2016-08-23 21:47:39
阅读次数:
221
Server端接收到Client端信息后不会返回给Client端 // TCPEchoServer.cpp : 定义控制台应用程序的入口点。// #include "stdafx.h"#include <Windows.h>#include <WinSock2.h>#include <strsafe ...
分类:
其他好文 时间:
2016-08-22 12:38:02
阅读次数:
118
。只要是“建立项目的时候不应建立空项目,而应当建立一个“win32控制台应用程序”。这样确实可以解决问题。只要你选择的是这个"win32控制台应用程序"则在附加选项里面选不选上“空项目”都可以。 其实问题在于,在空项目中不生成调试文件pdb,所以无法调试。 要让项目生成pdb文件,需要更改: 项目属 ...
分类:
其他好文 时间:
2016-08-20 10:13:34
阅读次数:
174
1.题目: 给定一个无序数组,其中元素 可正可负可0,给定一个k,求arr中所有的子数组累加和为k的最长子数组长度。 1 // maxLength.cpp : 定义控制台应用程序的入口点。 2 //未排序数组中累加和为指定值的最长子数组长度 3 //数组元素可正、可负、可0 4 5 #include ...
分类:
编程语言 时间:
2016-08-18 23:16:50
阅读次数:
254
可整合子数组:按由小到大排完序之后,后面的数比前一个数大1,如:[2,4,3,6,5]就是可整合数组。 1 // getLiL.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include <iostream> 6 #include <ha ...
分类:
编程语言 时间:
2016-08-18 01:01:39
阅读次数:
220
str1 = “adabbca”; str2 = "abc"; str1中包含str2的子串有abbc,bca,其中bca为最终结果,返回3 1 // minLengthContain.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #incl ...
分类:
其他好文 时间:
2016-08-14 23:50:56
阅读次数:
167
1 // WaterPool.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include <stdlib.h> 6 #include <vector> 7 #include <iterator> 8 #include <iostream> ...
分类:
编程语言 时间:
2016-08-14 16:10:17
阅读次数:
240
1.给定一个任意数组,和一个大小为w的窗口,该窗口从左到右依次滑动,得到窗口的每个状态下的最大值 1 // maxWindow.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include <iostream> 6 #include <de ...
分类:
其他好文 时间:
2016-08-13 10:02:23
阅读次数:
133
重新做人 1 // Copy_On_Write.cpp : 定义控制台应用程序的入口点。 2 // 3 4 #include "stdafx.h" 5 #include <cstring> 6 #include <string> 7 8 using namespace std; 9 10 11 #p ...
分类:
其他好文 时间:
2016-08-10 07:38:40
阅读次数:
272
// xuanze-sort.cpp : 定义控制台应用程序的入口点。// #include "stdafx.h"#include<iostream>#include<string>#include<vector>//vector向量容器using namespace std; /********* ...
分类:
其他好文 时间:
2016-08-03 21:58:37
阅读次数:
137