自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 资源 (1)
  • 收藏
  • 关注

原创 zoj 3574 Under Attack II//归并排序

求逆序对。其实,就是求交点。利用了归并排序的稳定性。 #include #include #include using namespace std; class node { public: int ly,ry; int num; }; node date[30005],temp[30005]; int ans=0; int cmp(const void *a,const void *b)

2012-02-28 19:31:49 674

原创 ZOJ 1610Count the Colors//线段树

线段树好长时间没写,这次自己敲了一遍,居然没错。 线段树核心:每次有更新时,并没有更新到叶节点,而是保存下来,待需要更新的时候,才做这些事。 注意:线段树的叶节点,可以是(x,x+1) 或者(x,x)。不同的是创建的时候。一个mid不需+1,另一则要求有。 #include #include using namespace std; const int maxlen =8011; class

2012-02-27 14:09:05 359

原创 hdu1717 小数化分数2

参照:http://www.cnblogs.com/Yu2012/archive/2011/09/22/2184764.html #include #include #include #include using namespace std; int gcd(int a,int b) { int temp=0; while(b!=0) { temp=a%b; a

2012-02-24 19:33:08 470

原创 ZOJ Alice's Sequence II //矩阵乘法

矩阵乘法果然犀利!   #include #include #include using namespace std; const int man=35; const int mod=10000007; char kk[10]="rdasit"; #define ll long long class node { public: ll a[man][man]; }; node date,ma

2012-02-21 00:24:37 446

原创 中山大学 1238: 兵临城下//优先队列

维护两队列。 #include #include #include using namespace std; class node1 { public : int time,pth; }; bool operator< (const node1 &a,const node1 &b) { return a.pth >b.pth ; } class node2 { public : int t

2012-02-17 16:48:56 490

原创 中南大学-1239: 审阅文稿//kmp

再次了解kmp! #include #include #include using namespace std; char st1[20001],st2[12000001]; int next[1000001]; bool equ(int i,char a[],int j,char b[]) { if(a[i]==b[j]&&a[i+1]==b[j+1]) return true; retu

2012-02-15 22:55:01 671

原创 ZOJ 3490 String Successor//字符串处理

原来,原来,这句漏掉了“the left of the leftmost alphanumeric”   (z)的后继是(aa)   o(╯□╰)o 细心很重要。   #include #include #include using namespace std; bool alph(char str[]) { int len=strlen(str),i; for(i=0;i<len;i++

2012-02-01 19:29:26 1181

创建学生信息管理系统

创建一个存储和显示学生信息的单文档应用程序。 功能如下:在编辑框中输入学生信息,单击“输入”按钮时,程序检测编号与以后学生信息是否重复,如果重复则跳出消息框提示“学号重复,请修改学生学号”,如果编号和姓名栏中是空的,系统提示“学生信息不全,请补全信息”,如果无上述情况,系统自动把输入内容存储到文档类中的一个学生信息类对象的数组中; 主菜单“编辑”中包含了“清空”子菜单,单击该子菜单或者点击工具栏上的红色“C”按钮时,删除所有学生的信息,并且清空界面上的“编号”和“姓名”编辑栏。

2010-12-06

空空如也

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

TA关注的人

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