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
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 #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 #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
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 #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 #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
最近在做一些优化工具,把鼠标拣选的功能单独抽出来。可遍历所有选中的某类型资源,会递归文件夹可编译所有prefab的某个Component,也是递归的using UnityEngine;using System.Collections;using UnityEditor;using System.Co...
分类:
编程语言 时间:
2015-11-13 20:46:24
阅读次数:
298
首先 在C#中引用数据库的操作!(因为我们用的是SQLserver数据库,所以是SqlClient)using System.Data.SqlClient;1:要实现对数据库的操作,我们必须先登录数据库 Console.WriteLine("请输入用户名:");//提示客户输入用户名和密码 stri...
分类:
数据库 时间:
2015-11-13 20:40:12
阅读次数:
344