码迷,mamicode.com
首页 >  
搜索关键字:using    ( 53562个结果
高斯-勒让德公式 求积分
1 #include 2 #include 3 using namespace std; 4 //计算f(x)=1/x 在[1,3]上的积分 5 6 double f(double x){ 7 return 1.0/(x+2); 8 } 9 10 double f1(double ...
分类:其他好文   时间:2015-11-13 23:35:27    阅读次数:311
ZOJ Problem Set - 2818
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1818一开始想着用循环做,看了别人的解法才发现根本没必要,比较根号n就行了 1 #include 2 #include 3 #include 4 using namespace s...
分类:其他好文   时间:2015-11-13 23:33:47    阅读次数:203
疯牛(二分)
疯牛时间限制:1000ms | 内存限制:65535KB难度:4描述农夫 John 建造了一座很长的畜栏,它包括N (2 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 typedef long long L....
分类:其他好文   时间:2015-11-13 23:27:21    阅读次数:346
1)②排序算法之选择排序{1]直接选择排序
1 #include 2 using namespace std; 3 4 //*******直接选择排序********* 5 int select_sort(int n,int array[100]){ 6 int i,j; 7 for(i=0;iarray[j]){10 ...
分类:编程语言   时间:2015-11-13 22:20:00    阅读次数:299
1)①排序算法之交换排序[2]快速排序
1 #include 2 using namespace std; 3 4 //************快速排序法********* 5 int partiton(int array[10],int s,int t,int &cutpoint){ 6 int x=array[s]; 7 ...
分类:编程语言   时间:2015-11-13 22:17:25    阅读次数:312
2)杨辉三角[1]队列实现
1 #include 2 #include 3 using namespace std; 4 5 enum error{overflow,underflow,success}; 6 const int maxlen=100; 7 8 class queue{ 9 public:10 q...
分类:其他好文   时间:2015-11-13 22:16:17    阅读次数:217
1)③排序算法之插入排序[1]直接插入排序
1 #include 2 using namespace std; 3 4 int direct_sort(int n,int array[100]){//直接插入排序 5 register int i,temp; 6 for(i=1;itemp){10 ...
分类:编程语言   时间:2015-11-13 22:10:37    阅读次数:271
1)③排序算法之插入排序[2]希尔排序
1 #include 2 using namespace std; 3 4 int shell_sort(int n,int array[100]){//希尔排序法 5 register int dh,temp,i,j; 6 dh=n/2; 7 while(dh>=1){...
分类:编程语言   时间:2015-11-13 22:09:58    阅读次数:250
Unity3d 鼠标拣选小功能集合
最近在做一些优化工具,把鼠标拣选的功能单独抽出来。可遍历所有选中的某类型资源,会递归文件夹可编译所有prefab的某个Component,也是递归的using UnityEngine;using System.Collections;using UnityEditor;using System.Co...
分类:编程语言   时间:2015-11-13 20:46:24    阅读次数:298
怎样从C#中打开数据库并进行 增 删 改 查 操作
首先 在C#中引用数据库的操作!(因为我们用的是SQLserver数据库,所以是SqlClient)using System.Data.SqlClient;1:要实现对数据库的操作,我们必须先登录数据库 Console.WriteLine("请输入用户名:");//提示客户输入用户名和密码 stri...
分类:数据库   时间:2015-11-13 20:40:12    阅读次数:344
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!