码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
hdu 3038 How Many Answers Are Wrong
http://acm.hdu.edu.cn/showproblem.php?pid=3038 1 #include 2 #include 3 #include 4 #define maxn 600000 5 using namespace std; 6 7 int f[maxn],d[max...
分类:其他好文   时间:2014-05-19 18:51:33    阅读次数:252
无限逼近思想
//#define LOCAL#include#includeusing namespace std;int const MAX_N=100001;int const INF=10000000;int N,M,x[MAX_N];void init(){ for(int i=0;i1) {...
分类:其他好文   时间:2014-05-19 17:20:45    阅读次数:204
HDU 1573 X问题 (中国剩余定理)
题目链接题意 : 中文题不详述。思路 : 中国剩余定理。求中国剩余定理中解的个数。看这里看这里 1 //1573 2 #include 3 #include 4 #include 5 6 using namespace std ; 7 8 long long x,y ; 9 long lo...
分类:其他好文   时间:2014-05-19 16:48:21    阅读次数:207
堆排序的实现
#includeusing namespace std;//大根堆,从小到达排序int a[101];void swap(int &a,int &b){ a=a^b; b=a^b; a=a^b; }void adjust(int *a,int root,int len){ int max=root;...
分类:其他好文   时间:2014-05-19 15:13:43    阅读次数:219
将数组传递给函数
1 #include 2 #include 3 using namespace std; 4 5 void modifyArray(int [], int); 6 void modifyElement(int); 7 8 int main() 9 {10 const int arr...
分类:其他好文   时间:2014-05-19 15:12:27    阅读次数:257
[游戏学习22] MFC 井字棋 双人对战
>_____ 2 #include "TicTac.h" 3 #include 4 #include 5 #include 6 using namespace std; 7 CMyApp myApp; 8 /*ofstream Cout("out.txt"); 9 void CM...
分类:其他好文   时间:2014-05-19 14:34:51    阅读次数:430
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
C++ 单链表模板类实现
单链表的C语言描述基本运算的算法——置空表、求表的长度、取结点、定位运算、插入运算、删除运算、建立不带头结点的单链表(头插入法建表)、建立带头结点的单链表(尾插入法建表),输出带头结点的单链表#include#includeusing namespace std;template class Lin...
分类:编程语言   时间:2014-05-19 11:55:01    阅读次数:541
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!