摘要: http://hihocoder.com/problemset/problem/1175题目大意:这是一个病毒传播的问题,建立在一个有向无环图的基础上,每一次传播后一个病毒都会把自身的全部病毒都传给前面,问最终整个图一共有多少病毒。思路:拓扑排序裸题代码:#inclu... 阅读全文
posted @ 2018-07-23 09:58 Let_Life_Stop 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 1, 01背包题目:hdoj 2546 代码:#include#include#include#include#include#include#include#includeusing namespace std;# define maxn 1010bool cmp... 阅读全文
posted @ 2018-07-18 17:27 Let_Life_Stop 阅读(108) 评论(0) 推荐(0) 编辑
摘要: You are given a string q. A sequence of k strings s1, s2, ..., sk is called beautiful, if the concatenation of these strings is strin... 阅读全文
posted @ 2018-07-15 15:11 Let_Life_Stop 阅读(261) 评论(0) 推荐(0) 编辑
摘要: 我只是挑着我不太会的地方整理,可能比较基础。类的继承主要分为三类,公有继承,私有继承,保护继承。然后主要记录一下不同的继承方法对派生类的不同作用。1,派生类私有继承于基类。这个时候,派生类继承了基类的公有部分和保护部分,并且继承的这一些数据成员以私有部分存在于派生类中... 阅读全文
posted @ 2018-07-05 22:31 Let_Life_Stop 阅读(2198) 评论(0) 推荐(0) 编辑
摘要: 话不多说,先上代码 #include#include#include#include#includeusing namespace std;class Date{private: int year,month,day;public: Date():year... 阅读全文
posted @ 2018-07-05 17:43 Let_Life_Stop 阅读(818) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#includeusing namespace std;class Date{public: int day,month,year; void init(int,int,int ); v... 阅读全文
posted @ 2018-07-05 16:29 Let_Life_Stop 阅读(211) 评论(0) 推荐(0) 编辑
摘要: #include#include#include#include#include# define maxn 1010using namespace std;bool IsExit[maxn];int num;class TimetoDay//小时转换为天数{publi... 阅读全文
posted @ 2018-07-05 12:09 Let_Life_Stop 阅读(140) 评论(0) 推荐(0) 编辑
摘要: E - Reachability from the Capital CodeForces - 999E E - Reachability from the Capital CodeForces - 999E E - Reachability from the Capital 题目链接:https:/ 阅读全文
posted @ 2018-07-04 00:17 Let_Life_Stop 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目链接:You are given a string ss consisting of nn lowercase Latin letters. Polycarp wants to remove exactly kk characters (k≤nk≤n) from ... 阅读全文
posted @ 2018-07-04 00:02 Let_Life_Stop 阅读(264) 评论(0) 推荐(0) 编辑
摘要: tarjan算法求图中的强连通子图的个数。 tarjan算法缩点运算的使用具体事例 题目链接:http://poj.org/problem?id=2186 具体大意:假设有三头公牛a,b,c。a仰慕b,b仰慕c,那么这个c就是剩下的所有公牛的仰慕对象,然后这个题就是让你算出符合条件的公牛一共有多少头 阅读全文
posted @ 2018-07-01 17:35 Let_Life_Stop 阅读(290) 评论(0) 推荐(0) 编辑