码迷,mamicode.com
首页 >  
搜索关键字:std    ( 41627个结果
树状数组Hdu1541
#include #include #include #include #include #include #include #include #include #include #include using namespace std;int a[222222];int ret[222222];c...
分类:其他好文   时间:2014-06-10 00:09:07    阅读次数:177
非常无聊——STD::sort VS 基数排序
众所周知,Std::sort()是一个非常快速的排序算法,它基于快排,但又有所修改。一般来说用它就挺快的了,代码一行,时间复杂度O(nlogn)(难道不是大叫一声“老子要排序!!”就排好了么。。。)。我们也知道,不基于比较的排序可以达到O(n),比如说基数排序。什么,它是O(n * log(10.....
分类:其他好文   时间:2014-06-10 00:04:07    阅读次数:326
windows namedPipe 命名管道clent and server
1.client: 1 #include "iostream" 2 #include "windows.h" 3 4 using namespace std; 5 void main(int argc,char* argv[]) 6 { 7 LPCTSTR Mess...
分类:Windows程序   时间:2014-06-08 07:17:48    阅读次数:333
C++ 中 int,char*,string,CString之间相互转换-整理
#include //使用C++标准库的string类时using namespace std;//同上#include #include #include //要将string类和int类型直接转换最好有这些包含,//因为自己写一个转换函数比较方便,函数定义参考如下string getstring...
分类:编程语言   时间:2014-06-08 06:37:42    阅读次数:304
poj 1789
题意:给定N个字符串 每个字符串可以看为一个点 每个点之间都有边 长度为对应两点之间字符不同的个数 把这些点连接起来 求最小的边长思路:Kruskal 算法的简单应用#include#includeusing namespace std;char a[2222][10];int dist[2222]...
分类:其他好文   时间:2014-06-07 23:07:30    阅读次数:237
poj 2485
题意://岛要修路,这个岛上有n个城市,要求修完路后,各城市之间可以相互到达,且修的总路程最短 求所有道路的最长的一段路程思路:Kruskal 算法简单的应用#include#includeusing namespace std;int map[501][501];int dist[501];int...
分类:其他好文   时间:2014-06-07 23:04:59    阅读次数:276
codeforces Round #250 (div2)
a题,就不说了吧b题,直接从大到小排序1-limit的所有数的lowbit,再从大到小贪心组成sum就行了 1 #include 2 #include 3 #include 4 #include 5 #define N 200000 6 using namespace std; ...
分类:其他好文   时间:2014-06-07 21:49:57    阅读次数:272
数据结构中线性表的基本操作-合并两个线性表-依照元素升序排列
#include#include#define LIST_INIT_SIZE 10/*线性表初始长度*/#define LIST_CREATENT 2/*每次的增量*/typedef int ElemType;using namespace std;typedef struct SqList/*线性...
分类:其他好文   时间:2014-06-07 21:01:21    阅读次数:322
树状数组Hdu1166
#include #include #include #include #include #include #include #include #include #include #include using namespace std;int c[222222];int n;int lowbit(...
分类:其他好文   时间:2014-06-07 20:24:57    阅读次数:226
C++ 多重继承
写在之前: C++是支持多重继承的,但一定要慎用,因为很容易出现各种各样的问题。 #include using namespace std;class B1{public: B1(){coutusing namespace std;class B1{public: B1(){coutusing na...
分类:编程语言   时间:2014-06-07 17:05:44    阅读次数:335
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!