好无力,今天改到了自认为的最优法,还能超时吗???#include#include#define bool int //两个数据的交换void swap(int *a,int *b) { int temp; temp = *a; *a = *b; *b = temp;}//优...
分类:
其他好文 时间:
2014-08-22 17:46:09
阅读次数:
167
//string转xml XmlDocument doc = new XmlDocument(); doc.LoadXml(temp); XmlNodeList nodes1 = doc.GetElementsByTagName("...
分类:
其他好文 时间:
2014-08-22 15:50:18
阅读次数:
186
QPixmap pix1(":/PixmapTest/Resources/Chrysanthemum.jpg"); QPixmap temp(pix1.size()); temp.fill(Qt::transparent); QPainter p1(&temp); p1.setComposition...
分类:
其他好文 时间:
2014-08-22 12:19:06
阅读次数:
651
int[] nums={1,3,5,7,9,2,4,6,8};//定义数组int temp=0;// 定义临时变量for(int i=0;inums[j+1])//如果前面一个数字大于后面一个数字,就交换大小 { temp=nums[j]; nums[j]=nums[j+1...
分类:
其他好文 时间:
2014-08-21 14:59:54
阅读次数:
509
在Windows下的路径分隔符和Linux下的路径分隔符是不一样的,当直接使用绝对路径时,跨平台会暴出“No such file or diretory”的异常。比如说要在temp目录下建立一个test.txt文件,在Windows下应该这么写:File file1 = new File ("C:\...
分类:
编程语言 时间:
2014-08-20 19:32:32
阅读次数:
195
#include
void temp(int *m,int *n)//交换的是指定地址中存储的值
{
int t;
t=*m;
*m=*n;
*n=t;
}
void main()
{
int a,b,c;
int *p,*q,*w;
p=&a;
q=&b;
w=&c;
scanf("%d%d%d",p,q,w);
if(a>b)
temp(p,q);
if(a>c)
...
分类:
其他好文 时间:
2014-08-20 18:06:32
阅读次数:
139
一.冒泡排序 int temp = 0; for (int j = 1; j < a.Length; j++) { for (int i = 0; i < a.Length - j; i++)//内循环,每走一趟会把最小值...
分类:
其他好文 时间:
2014-08-19 20:41:15
阅读次数:
175
1、基础 jquery对象集: $():jquery对象集合 获取jquery对象集中的元素: 使用索引获取包装器中的javascript元素:var temp = $('img[alt]')[0] 使用jquery的get方法获取jquery对象集中的javascript元素:var temp =...
分类:
Web程序 时间:
2014-08-19 18:27:05
阅读次数:
324
java中方法的参数传递只有一种:值传递public class SwapMethod {/** * 交换方法 * @param a * @param b */public static void Swap(int a , int b){int temp ;temp =a;a = b;b = tem...
分类:
编程语言 时间:
2014-08-19 12:24:44
阅读次数:
163
报错信息如下: 数据库客户端打不开解决方案: 找到下面的目录C:\Users\\AppData\Local\Temp 创建一个空文件夹 名称是:2 重新打开数据库
分类:
数据库 时间:
2014-08-19 10:35:53
阅读次数:
261