随笔分类 -  C++笔记

记录我的C++学习历程,整理笔记的同时也是梳理知识,分享知识的过程
摘要:The following characteristics represent a pure approach to object-oriented programming:1. Everything is an object.2. A program is a bunch of objects telling each other what todo by sending messages.3. Each object has its own memory made up of other objects.4. Every object has a type.5. All objects o 阅读全文
posted @ 2010-12-16 16:15 Moupeng.Yang 阅读(286) 评论(0) 推荐(0)
摘要:#include <iostream>#include <vector>using namespace std;int states[6][6];int ct=0;int flag=0;class drop{ public: drop(int x,int y,int d1,int d2) { position_x = x; position_y = y; direction... 阅读全文
posted @ 2010-12-15 23:54 Moupeng.Yang 阅读(815) 评论(3) 推荐(0)
摘要:这道题其实就是二分图的最大匹配问题。用构造匈牙利树的方法可以有效的提高求解的效率。 阅读全文
posted @ 2010-10-13 01:30 Moupeng.Yang 阅读(416) 评论(0) 推荐(0)
摘要:Problemkitty的基因编码如下定义: kitty的基因由一串长度2^k(k<=8)的01序列构成,为了方便研究,需要把,01序列转换为ABC编码。用T(s)来表示01序列s的ABC编码 T(s)=‘A'(当S全由'0'组成) T(s)=‘B'(当s全由'1'组成) T(s)=‘C'+T(s1)+T(s2) s1,s2为把s等分为2个长度相等的子串 ... 阅读全文
posted @ 2010-10-08 06:09 Moupeng.Yang 阅读(911) 评论(2) 推荐(1)