#include "stdafx.h"void temp(int *l,int i,int j){ l[i]=l[i]^l[j]; l[j]=l[i]^l[j]; l[i]=l[i]^l[j];}//使用异或有个问题,当i和j相等时,不能实现交换的目的void HeapSort_M...
分类:
编程语言 时间:
2015-04-05 23:08:11
阅读次数:
205
/*编写一个函数,传入a,b两个int类型的变量,返回两个值的最大公约数。
例如:输入传入(0 , 5)函数返回5,传入(10 , 9)函数返回1,传入(12 , 4)函数返回4
*/
#include
int yue(int a,int b)
{
int temp;
int n;
if (a>b)
{
temp=a;
a=b;
b=temp;
}
n=a;
if(a=...
分类:
编程语言 时间:
2015-04-05 21:57:12
阅读次数:
225
#include #include#includeusing namespace std;//智二//交换数组中两个元素的位置void swap(int left, int right, int sort[]){ int temp; temp = sort[left]; sort...
分类:
编程语言 时间:
2015-04-05 20:11:23
阅读次数:
120
/*编写一个函数,传入a,b两个int类型的变量,返回两个值的最大公约数。
例如:输入传入(0 , 5)函数返回5,传入(10 , 9)函数返回1,传入(12 , 4)函数返回4*/
#include
int yue( int x, int y )
{
int temp,min;
if( x > y )
{
temp = x;
x = y;
y = temp;
}
mi...
分类:
编程语言 时间:
2015-04-05 18:54:07
阅读次数:
156
6 -1 5 4 -7#includeusing namespace std;int main(){ int t,n,a,max,sum,start,end,temp; while(cin>>t){ for(int i=1;i>n; max=-1001;...
分类:
其他好文 时间:
2015-04-05 14:32:16
阅读次数:
111
function?post(url,?params)?{
????var?temp?=?document.createElement("form");
????temp.action?=?url;
????temp.method?=?"post";
????temp.style.display?=?"none";
????for...
分类:
Web程序 时间:
2015-04-05 12:07:37
阅读次数:
115
Temp DB 在DW中变得非常重要,因为要进行大量的运算,如果内存不够数据就会放在Temp DB中1. 把Temp DB移动到高性能的磁盘上。2. 增加tempdb 的大小3. 把Auto Shrink设置为 False
分类:
数据库 时间:
2015-04-04 20:59:30
阅读次数:
196
#include<stdio.h>#include<stdlib.h>#defineERROR-1typedefstructlist{ doublecoef; intexpn; structlist*next;}polyn;polyn*creatpolyn(polyn*p,intm){ p=(polyn*)malloc(sizeof(polyn)); p->next=NULL; while(m--){ polyn*temp=(polyn*)malloc(sizeof(poly..
分类:
编程语言 时间:
2015-04-04 19:49:48
阅读次数:
227
//求最大公约数是用辗转相除法,最小公倍数是根据公式 m,n 的 最大公约数* m,n最小公倍数 = m*n 来计算 #include //将两个整数升序排列 void ascNum(int *p1,int *p2) { int temp; if(*p1 >...
分类:
其他好文 时间:
2015-04-04 18:21:37
阅读次数:
143
1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int high[100010]; 7 int temp[100010]; 8 int angry[100010]; 9 int num;10 void...
分类:
编程语言 时间:
2015-04-03 23:45:54
阅读次数:
286