码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
windows系统调用 线程 启动与挂起
#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 计数排序
//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
2014年百度之星程序设计大赛 - 初赛(第二轮)
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
_strdup和strdup还有string.h和string事
在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
*HDU 1394 经典逆序数的四种解法
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!