#include "iostream"#include "windows.h"using
namespace std;class CWorkerThread{public: CWorkerThread(LPCTSTR
m_szName):m_szName(m_szName),m_hThread(IN...
分类:
编程语言 时间:
2014-06-13 00:06:51
阅读次数:
298
//counting sort
计数排序//参考算法导论8.2节#include#include#include#includeusing namespace std;const int
k=5;const int n=7;int a[n]={5, 5, 1, 2 , 5, 4, 1};int b[...
分类:
其他好文 时间:
2014-06-12 23:08:11
阅读次数:
237
1001暴力#include #include #include using namespace
std;const int maxn = 100100;int ll[maxn], rr[maxn];struct node{ int x, y,
bj;}e[maxn];int main(){ int...
分类:
其他好文 时间:
2014-06-12 18:51:11
阅读次数:
238
关键是要排序,如AABBBBC,然后可比较,当相同时将当前位置向后移,而不增加统计数目,不同时增加统计数目,再退出第二循环,这样就可以统计了。 1
#include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 int n...
分类:
其他好文 时间:
2014-06-12 16:53:41
阅读次数:
182
在MSVC中,_strdup(const char
*p)函数的作用是返回一个指针,这个指针指向p的一个复制串。#includeint main(){ char str[]="this is a string";
char *dstring=strdup(str); std::co...
分类:
其他好文 时间:
2014-06-12 14:26:37
阅读次数:
277
1、暴力【代码】: 1 /*HDU1394暴力写法*/ 2 #include 3 #include 4
#include 5 6 using namespace std; 7 8 int A[50005]; 9 int
Low[50005],Up[50005];10 int main(){...
分类:
其他好文 时间:
2014-06-12 12:02:37
阅读次数:
191