??
冒泡,快排都是常见的排序方法,这里介绍用头文件中的qsort函数排序。不过自己要先一个cmp函数。
#include//qsort的头文件
int a[100]={0,2,4,1,5,7,3,8,9}; //要排序的数组
struct Person//要排序的结构体
{
char num[20];
char name[100];
int score;
int sum;
}man...
分类:
其他好文 时间:
2014-08-13 22:39:27
阅读次数:
330
sort函数:#include 默认从小到大,如果降序可写第三方函数进行排序,EXP:sort(array,array+n,cmp)①sort(数组首地址,首地址+排序个数)第一个参数是要排序的区间首地址,第二个参数是区间尾地址的下一地址。也就是说,排序的区间是[a,b)。简单来说,有一个数组int...
分类:
其他好文 时间:
2014-08-13 14:21:36
阅读次数:
199
OllyDbg 使用笔记 (六)
参考
书:《加密与解密》
视频:小甲鱼 解密系列 视频
去除NAG以及运行次数限制
方法1:
去除NAG窗口的方法是:F8运行程序,碰到出现NAG的CALL就下断点,重新运行按F7进入此CALL,直到找到用户领空“真正“CALL出NAG窗口的CALL。观察此CALL前后的代码。
按照前面说的,找到这个CALL在 00489912
可以发现这个CALL返回eax=1,而且下面的一句是判断cmp是否是1,是1就正常运行。所以这个CALL的...
分类:
数据库 时间:
2014-08-12 00:43:53
阅读次数:
326
1、用sort对结构体中字符串进行二级排序
#include
#include
using namespace std;
struct s
{
int d;
char c[10];
}ss[15];
bool cmp(s a,s b)
{
if(strcmp(a.c,b.c)!=0)
...
分类:
其他好文 时间:
2014-08-11 06:19:01
阅读次数:
171
#include #include #include #include #include using namespace std;struct node{ char msg[20]; int a,b;};struct cmp{ bool operator()(const node ...
分类:
其他好文 时间:
2014-08-10 21:17:20
阅读次数:
214
accept#include#include#include#includeusing namespace std;char ss[20005][25];int num[20005];int n,m;int cmp(const void * a,const void * b){ int i,a...
分类:
其他好文 时间:
2014-08-10 18:25:40
阅读次数:
416
一、打开其它应用程序[以打开QQ为例]1 Intent intent = new Intent();2 ComponentName cmp = new ComponentName("com.tencent.mobileqq","com.tencent.mobileqq.activit...
分类:
其他好文 时间:
2014-08-06 10:24:01
阅读次数:
165
#include #include #include using namespace std;bool cmp(int a,int b){ return a>b; }int main(){ int n,i; cin>>n; vector a(n); for(i=0;...
分类:
其他好文 时间:
2014-08-06 01:45:20
阅读次数:
261
# include
# include
# include
using namespace std;
int cmp(int x,int y)
{
return x>y;
}
int main()
{
int a[110],a1[110],a2[110],ans[110];
int n,k,k1,k2,i,k3;
while(~scanf("%d%d",&n,&k))
{
k1...
分类:
其他好文 时间:
2014-08-04 21:46:48
阅读次数:
237
打开指定程序 Intent intent = new Intent();ComponentName cmp = new ComponentName("com.sina.weibo","com.sina.weibo.EditActivity");intent.setAction(Intent.ACTI...
分类:
移动开发 时间:
2014-08-03 12:36:35
阅读次数:
385