码迷,mamicode.com
首页 >  
搜索关键字:network namespace    ( 53294个结果)
快速排序(递归及非递归算法源码)
1、 递归算法:quicksort.cpp#include using namespace std;void Swap(int a[],int i,int j){ int temp=a[i]; a[i] = a[j]; a[j] = temp;}int Partition(int a[],int l...
分类:其他好文   时间:2014-05-27 02:29:55    阅读次数:274
堆排序(源码)
源码://HeapSort.cpp#include using namespace std;//about heap://the last leaf node is a[n-1]//the last non-leaf node is a[n/2-1];// a[i]// ...
分类:其他好文   时间:2014-05-27 02:21:23    阅读次数:240
冒泡排序(算法源码)
算法源码://BubbleSort.cpp#include using namespace std;void BubbleSort(int a[], int n){ for(int i=n-1;i>0;i--) { for(int j=0;ja[j+1]) { int tmp = a[j...
分类:其他好文   时间:2014-05-27 02:07:07    阅读次数:223
hdu1104Remainder
题意:对于n,m,k,定义n的操作,+m,-m,*m,%m,(You should know that if a = b * q + r (q > 0 and 0 3 #include 4 #include 5 #include 6 #include 7 using namespace s...
分类:其他好文   时间:2014-05-27 01:39:48    阅读次数:285
apache http client vs urlconnection
Google has deprecated HttpClientChoose an HTTP ClientMost network-connected Android apps use HTTP to send and receive data. Android includes two HTTP ...
分类:其他好文   时间:2014-05-27 01:12:43    阅读次数:343
IEEE/ACM ASONAM 2014 Industry Track Call for Papers
IEEE/ACM International Conference on Advances in Social Network Analysis and Mining (ASONAM) 2014 Industry Track Call for Papers* Apologies if you rec...
分类:其他好文   时间:2014-05-24 07:27:55    阅读次数:327
C#泛型列表List<T>基本用法总结
http://space.itpub.net/14466241/viewspace-624132示例代码如下:namespace SampleListT{ class Program { static void Main(string[] args) { //using System...
分类:其他好文   时间:2014-05-19 13:28:56    阅读次数:233
寻找数组中重复次数最多的数
#include#includeusing namespace std;int helper(const int a[],const int n){ map m; for(int i = 0;i::iterator comp = m.begin(); for( map::iterator it...
分类:其他好文   时间:2014-05-19 12:44:34    阅读次数:270
找到数组中唯一重复的数
#include#include#includeusing namespace std;int helper1(int a[],int n){ int sum = accumulate(a,a+n,0); int sum2 = n*(n-1)/2; return sum-sum2;}int h...
分类:其他好文   时间:2014-05-19 12:25:25    阅读次数:183
在O(n)时间复杂度内找到出现超过一半的数
#includeusing namespace std;bool solver(const int a[],const int n, int & num){ if(NULL == a || 0>= n) return false; ////注意,是小写~ int count = 0; ...
分类:其他好文   时间:2014-05-19 12:11:20    阅读次数:335
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!