自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(9)
  • 收藏
  • 关注

原创 I am back

好长时间没来CSDN写博客了,最近也一直在纠结于是否要考研。就把写博客当成发泄的方式吧。我感觉自己有点把精力分散了,脑子很乱,有时候什么都不想干。啊啊啊

2011-11-14 23:16:19 363

原创 使用vector的经验与总结

<br />vector是一个类模板,也是一个容器类,即里面可以放一个个的元素,vector<T>容器中元素的类型就是T类型。vector有几个不同的构造函数:<br /> <br />1.默认构造函数 例如:vector<T>() ;// 构造了一个匿名的vector<T>的对象<br /> <br /> <br />2. 一个参数的构造函数 例如:vector<T>(10); // 构造了一个匿名的vector<T>的对象<br />注意该构造函数有一个默认参数,那就是最右边的参数。该构造函数的默认使用

2010-10-17 22:23:00 2090

原创 备战ACM资料

<br />备战ACM资料<br />一:知识点<br />    数据结构:<br />      1,单,双链表及循环链表<br />      2,树的表示与存储,二叉树(概念,遍历)二叉树的          <br />         应用(二叉排序树,判定树,博弈树,解答树等)<br />      3,文件操作(从文本文件中读入数据并输出到文本文       <br />         件中)<br />      4,图(基本概念,存储结构,图的运算)<br />   数学知识<br /

2010-07-02 00:00:00 2908

原创 从M中选N的所有排列 算法

<br />//从M中选N个不同数字的所有排列<br />#include  “stdio.h”<br />int  m, n;<br />//=================================<br />int  Place(int t) //判重<br />{  int j;<br />for(j=1; j<=t-1; ++j)<br />    if( a[j]==a[t]) return 0;<br />return 1;   }<br />//===================

2010-06-29 18:18:00 1059

原创 堆排序

<br />#include <stdio.h><br />void heapadjust(int arr[],int s,int m)<br />{<br />   int rc = arr[s],j;<br />   for(j=s*2;j<=m;j=j*2)<br />   {<br />      if(j<m&&arr[j]<arr[j+1])j++;<br />      if(rc>=arr[j])break;<br />      arr[s] = arr[j];<br />      s

2010-06-28 23:15:00 435

原创 树的前序遍历

<br />#include <stdio.h><br />typedef struct tnode{<br />      char data;<br />   struct tnode *right,*left; <br />}tnode,*tnodeptr;<br />void create(tnodeptr *t)//t为指针的指针 <br />{<br /> char ch;<br /> scanf("%c",&ch);<br /> if(ch==' ')(*t)=NULL;<br /> else

2010-06-28 23:13:00 558

原创 骑士周游 回溯法

<br />#include <iostream><br />#define N 5<br />using namespace std;<br />int chess[N][N];<br />int horizontal[8]={2,1,-1,-2,-2,-1,1,2},vertical[8]={1,2,2,1,-1,-2,-2,-1};<br />int count=0;<br />bool place(int s,int t)<br />{<br />    if(s>=0&&s<N&&t>=0&&t<

2010-06-16 22:55:00 816

原创 骑士周游 贪心

<br />#include <iostream><br />#include <iomanip><br />#define N 8<br />using namespace std;<br />int a[8][8],sum=1;<br />int acs[8][8]={{2,3,4,4,4,4,3,2},{3,4,6,6,6,6,4,3},{4,6,8,8,8,8,6,4},{4,6,8,8,8,8,6,4},{4,6,8,8,8,8,6,4},{4,6,8,8,8,8,6,4},{3,4,6,6,6,

2010-06-16 22:53:00 592

原创 走迷宫 回溯法

<br />#include <iostream><br />#include <windows.h><br />using namespace std;<br />#define FINISH_X 4<br />#define FINISH_Y 11<br />#define M 1000<br />char a[12][12] = {{'#','#','#','#','#','#','#','#','#','#','#','#'},<br />                  {'#',' ',' '

2010-06-14 19:18:00 802

空空如也

空空如也

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

TA关注的人

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