自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(312)
  • 资源 (11)
  • 收藏
  • 关注

原创 adb server is out of date.

如图所示:        cannot bind 'tcp:5037'        原来是端口绑定失败:用以下命令查找是哪一个进程(PID)占用端口        netstat -ano         然后用tskill PID        重新启动:adb start-server

2013-05-22 00:53:01 601

原创 set相关操作源码

/* set相关算法*///set_uniontemplate OutputIterator set_union(InputIterator1 first1,InputIterator1 last1, InputIterator2 first2,InputIterator2 last2, OutputIterator result){ /

2012-08-15 11:28:27 510

转载 红黑树源代码

/* RBTree.h*/#ifndef _RB_TREE_H_#define _RB_TREE_H_#include #include #include #include using namespace std;templateclass RB_Tree{ private: RB_Tree(const RB_Tr

2012-08-10 16:52:55 2443

原创 归并排序

/* 归并排序*/#include #include #include #include #define BASE 1024void mergeSort(int*, int, int);void merge(int*, int, int, int);int main(void){ int n; int i; int *arr

2012-08-09 10:29:32 433

原创 一个C程序怎么就可以神奇的运行起来那?

一个C程序怎么就可以神奇的运行起来那?以下是我的main.c:#include /*这是注释*/int main(void){ printf("hello world\n"); return 0;}以下是我的main.i:# 1 "main.c"# 1 ""# 1 ""# 1 "main.c"# 1 "/usr/include/stdio.h" 1 3 4

2012-08-06 20:21:18 762

原创 tracert的使用!

2012-06-24 10:50:46 569

原创 ping的使用!

2012-06-24 10:50:20 300

原创 n后问题之二

#include #include #define MAXSIZE 50typedef int bool;#define true 1#define false 0int n;int sum;int x[MAXSIZE];//输入void input();//初始化void init();//判断是否可放bool canPlace(i

2012-06-23 18:34:41 418

原创 n后问题之一

/* n后问题*/#include #include typedef int bool;#define true 1#define false 0#define MAXSIZE 50//皇后个数int n;//总数int sum;//解int x[MAXSIZE];//输入void input();//初始化void

2012-06-23 18:01:05 399

原创 批处理作业调度

/* 批处理作业调度 输入: 3 2 1 3 1 2 3 输出:18 1 3 2*/#include #include #include #define MAXSIZE 100int n; //作业的个数int m1[MAXSIZE];

2012-06-21 10:19:46 798 1

原创 装载问题之三

/* 构造最优解*/#include #include #define MAXSIZE 100int n; //集装箱个数int c; //容量int w[MAXSIZE]; //集装箱重量int r; //剩余重量int

2012-06-18 15:51:25 409

原创 装载问题之二

/* 上界函数*/#include #include #define MAXSIZE 100//全局变量int n; //集装箱个数int c; //容量int r; //剩余容量int w[MAXSIZE]; //集装箱重量int cw;

2012-06-18 15:36:56 422

原创 装载问题之一

#include #include #define MAXSIZE 100int n; //集装箱的个数int c; //集装箱的容量int w[MAXSIZE]; //集装箱的重量int cw; //当前重量int bestw;

2012-06-18 15:13:43 509

原创 i++和++i

#include int main(void){ //i int i = 0; printf("i = %d\n", i); //i++ i = 0; printf("i++ = %d\n", i++); printf("i = %d\n", i); //++i i = 0; printf("++i = %d\n", ++i); printf("i = %d\n", i)

2012-05-29 19:45:01 349

原创 你见过这样的Hello World么?

// pragma.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std;#pragma comment(linker, "/entry:print")#pragma comment(lib, "msvcrt.lib")void print(void){

2012-05-19 13:02:31 309

原创 单链表逆置

node* reverse(node *head, node *pre) { node *p = head->next; head->next = pre; if(p) { return reverse(p, head); } else { return head; }}

2012-05-08 22:15:48 317

原创 用指向指针的指针对5个字符串进行排序

#include #include #define MAXSIZE 100void sort(char**, int);int main(void){ int i; char charArray[5][MAXSIZE]; char *pCharArray[5]; //输入 for (i = 0; i < 5; ++i)

2012-04-11 15:41:26 4770

原创 用指向指针的方法对n个整数排序并输出。

/* 功能:用指向指针的方法对n个整数排序并输出。要求将排序单独写成一个函数。n和 整数在主函数中输入。最后在主函数中输出。*/#include #include #define MAXSIZE 100void swap(int*, int*);void sort(int**, int);int main(void){ int i;

2012-04-11 14:44:57 7362

原创 取余与除法

取余: 当存在负数时:  |x|   同号  : x - y  异号  : x + y除法: 当存在负数时:  |x|   |x| > |y| : 符号和x的符号相同|x| / |y|

2012-04-09 13:52:03 451

原创 矩阵连乘问题

/* 输入示例: 6 30 35 15 5 10 20 25 DP: 0 i = j m[i][j]= min(m[i][k] + m[k + 1][j] + pi-1 * pk * pj) i < j

2012-04-03 12:43:40 368

原创 已知三角形三条边,你能做什么?

假设三角形三条边分别为a,b,c。一求三角形面积:        p = (a + b + c) / 2        s = sqrt(p * (p - a) * (p - b) * (p - c))二求内接圆半径:       r = 2 * s / (a + b + c)三求外接圆半径:       r = a * b * c / 4 * s

2012-04-02 17:27:40 459

原创 快速排序

#include #include int partition(int*, int, int);void qSort(int*, int, int);void swap(int*, int*);int main(void){ int i; int array[] = {11, 5, 20, 5, 100, 88, -987, 666, 0, 11, 11

2012-03-30 23:26:18 288

原创 棋盘覆盖

/* 0 0 0 1 2*/#include #include #define MAXSIZE 100int total = 0;void chessBoard(int, int, int, int, int);int board[MAXSIZE][MAXSIZE];int power(int);int main(void){ int i

2012-03-30 13:55:48 611 2

原创 归并排序

#include #include #include #include #define MAXSIZE 100#define ARRAYSIZE 8void mergeSort(int*, int);void _mergeSort(int*, int, int);//合并void merge(int*, int, int, int);//复制void c

2012-03-30 09:58:41 262

原创 二分查找

#include #include int binarySearch(int*, int, int, int*, int*);int main(void){ int left; int right; int array[] = {1, 5, 10, 12, 100, 666, 667, 800, 900, 1000}; printf("%d\

2012-03-29 13:53:19 256

原创 汉诺塔问题

#include #include void hanoi(int, char, char, char);void move(int, char, char);int main(void){ hanoi(3, 'A', 'B', 'C'); return 0;}//将n个塔座从a搬到c,b为辅助void hanoi(int n, char a, c

2012-03-29 13:42:59 2274

原创 最长公共子序列

#include #include #include #define MAXSIZE 100//最长公共子序列int LCS(const char *a, const char *b, char *result);int main(void){ char *a = "ABCBDAB"; char *b = "BDCABA"; char re

2012-03-28 12:53:49 269

原创 递归和非递归实现数组求和

#include #include #define MAXSIZE 100//定义结构体typedef struct Array{ int data[100]; int length;}Array;//非递归实现int sum (Array);//递归实现int sumRecursive (int[], int);int main(v

2012-03-25 23:21:49 789

原创 自己写strcpy

char* strcpy(char *strDest, const char *strSrc){ char *address = strDest; assert((strDest != NULL) && (strSrc != NULL)); while (*strSrc) { *strDest++ = *strSrc++; } *strDest = '\0';

2012-03-25 01:00:03 387

原创 自己写strcat

#include #include #include char* strcat(char*, const char*);int main(void){ char src[] = "i love you an ting"; char dest[] = "need you now"; strcat(dest, src); printf("%s

2012-03-25 00:55:24 504

原创 自己写strstr

int strstr(char str[], char par[]){ assert((str != NULL) && (par != NULL)); int i = 0; int j = 0; while (str[i] && par[j]) { if (str[i] == par[j])//如果相等 { ++i; ++j; }

2012-03-25 00:37:29 553

原创 递归实现链表的正序和倒序输出

void display(Link p)//正序{ if(p==NULL) { return; } printf("%d\n", p->data); display(p->next);}void displayReverse(Link p)//倒序{ if(p==NULL) {

2012-03-10 00:12:25 2759

原创 多项式相加

/* 说明:共有三个文件main.c,Polynomial.h,Polynomial.c 实例输入: 4 7 0 3 1 9 8 5 17 3 8 1 22 7 -9 8*///main.c#include #include #include "Polynomial.

2012-03-03 22:38:47 373

原创 双向链表

//main.c#include #include #include "DoublyLinkedList.h"int main(void){ int choice; DLL dll; Init(&dll); Create(&dll); while (1) { printf("please ente

2012-03-02 21:27:54 289

原创 strstr源码

const char * _strstr(const char *src, const char *needle){ const char *p1, *p2; p1 = src; p2 = needle; while (*src != '\0' && *needle != '\0') { if (*src++ != *needle++

2012-02-13 14:00:43 392

原创 OSI和TCP/IP的体系结构

OSI的体系结构7应用层6表示层5会话层4运输层3网络层2数据链路层1物理层 TCP/IP的体系结构4应用层3运输层2网际层IP1网络接口层 五层协议的体系结构5应用层4运输层3网络层2数据链路层1物理层

2011-12-21 19:34:08 332

原创 模板链表

#include using namespace std;template class ListNode{ private: TYPE data; ListNode *next; static ListNode *CurNode; static ListNode *head; public: ListNode()

2011-12-19 20:16:41 281

原创 模板栈

#include using namespace std;template class Stack{ private: int size; int top; T *space; public: Stack(int = 10); ~Stack() { delete[] space;

2011-12-19 20:04:49 316

原创 ASCII字符集

2011-12-09 19:28:59 309

原创 memcpy源代码

/****memcpy.c - contains memcpy routine** Copyright (c) Microsoft Corporation. All rights reserved.**Purpose:* memcpy() copies a source memory buffer to a destination buffer.*

2011-12-09 19:14:43 361

图书管理系统(数据库实习)

数据库实习论文,大家可以参考参考,有sql的实现,也有oracle的实现

2011-06-29

离散数学(方世昌)西安电子科技大学

离散数学,相当重要的一门课程,大家一定要学好

2011-06-15

MySQL驱动,编写java时用到

MySQL驱动,编写java时直接导入,即可实用

2011-06-11

n皇后问题(回溯法,C++)

n皇后问题相信大家早已熟悉了,用回溯法解,那是相当的简单。

2011-05-23

01背包问题(回溯法,C++写的)

01背包问题,是一个经典问题。用回溯法,当然是很好的选择,也容易理解

2011-05-23

快速排序(大一的过来看看)

快速排序是非常高效的排序算法,当然你可以用系统的库函数。但是,自己写的不是更加给力么?

2011-05-23

汉诺塔问题(递归,C++)

汉诺塔,相信大家早已熟悉了。用递归做,既简单,又好懂。所以,上传上来,给大家看看。

2011-05-23

布线问题(分支限界法)

布线问题,和迷宫问题是同一类问题。都是通过广度优先搜索来解决的。当然,深度就更好了。

2011-05-22

循环赛日程表(分治递归法)

循环赛日程表是非常典型的分治递归的例子,也的一个稍微有点难的问题。但是,我相信大家一定没问题

2011-05-22

m着色问题(回溯法)

m着色问题,用C++写的,回溯法写的,其实就和n皇后问题非常类似,相信大家一定没问题吧

2011-05-22

桌面搜索小工具(java)

用java写的一个桌面搜索小工具,可以实现文件搜索和文本检索。

2011-05-22

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除