在最近的学习中,对于排序算法进行了一定的学习,在这里对快速排序和选择排序的部分内容进行说明,其余内容在后期会进行补充,感谢大家提出宝贵意见。
宏定义如下:
#include
using namespace std;
#define M 21
typedef int SqList[M];
一.冒泡排序
void BubbleSort(SqList &L,int n)...
分类:
编程语言 时间:
2015-06-17 07:08:33
阅读次数:
129
VB ProceduresA VB.NET procedure (aka sub for subroutine) is defined using the Sub / End Sub keywords. The procedure is invoked by using its name as a ...
分类:
其他好文 时间:
2015-06-17 01:49:20
阅读次数:
173
// 用一个二进制串表示状态0,表示东西或者人在河的这边
// 1表示东西或者人在河的另一边
// 比如0000表示都在起始的位置,1111表示都到了对岸
// 通过状态的转移,来找到路径
#include
#include
#include
#include
using namespace std;
const int maxn = 100;
const int inf = 0x7f7...
分类:
其他好文 时间:
2015-06-17 01:49:16
阅读次数:
116
这题,一开始以为是第几个素数,后来打表之后查了一下,发现不是。
再看看题目,才知道是简单的筛选法。
每一个筛选留下来的数n,n往后的所以数,能被n整除的除去,不能的留下,筛选出3000个数出来就OK了。
下面的是AC的代码:
#include
#include
using namespace std;
int num[50000];
int a[3005];
int main()...
分类:
其他好文 时间:
2015-06-17 00:44:18
阅读次数:
137
题目链接:http://acm.swust.edu.cn/problem/0666/Time limit(ms): 1000 Memory limit(kb): 65535Description小李去埃及旅游,但是初来乍到的他不认识罗马数,所以请你将阿拉伯数n ( 0 2 using n...
分类:
其他好文 时间:
2015-06-17 00:34:29
阅读次数:
126
我使用Input的Touch和EasyTouch各实现了滑屏方案,基本原理就是得到滑屏移动时的二维向量,通过向量获取究竟是向哪个方向滑动,通过自定义的状态来实现。下面上代码:下面是EasyTouch实现的: 1 using UnityEngine; 2 using System.Collecti.....
分类:
编程语言 时间:
2015-06-17 00:14:37
阅读次数:
539
http://acm.hdu.edu.cn/showproblem.php?pid=2109
水题#include
#include
#include
using namespace std;
int data1[105];
int data2[105];
int main()
{
int m;
while(cin>>...
分类:
其他好文 时间:
2015-06-16 23:07:23
阅读次数:
331
感受一下Word强大的编辑能力吧! 试一下图片插入 再来一段代码看看 using System; using System.Windows.Forms; using Tamir.SharpSsh.jsch; /* PortForwardingR.cs * ======================...
分类:
其他好文 时间:
2015-06-16 22:47:23
阅读次数:
153
1.基与jquery的异步请求 2.基与微软自带的mvc异步请求 MicrosoftAjax @using (Ajax.BeginForm("GetDate", "Ajax", new Ajax...
分类:
Web程序 时间:
2015-06-16 22:43:39
阅读次数:
179
题目描述:Divide two integers without using multiplication, division and mod operator.If it is overflow, return INT_MAX. 提示中谈到Binary Search,由此可想到解决方案。solu....
分类:
其他好文 时间:
2015-06-16 22:35:23
阅读次数:
167