- 博客(3)
- 收藏
- 关注
原创 离散 单射 满射 双射
单射 双射 满射 阐述一下什么是单射,双射,满射 1.单射: 对于每一个不同的x都有不同的y,即 x1!=x2–>y1!+y2 条件:|X|<=|Y| 2.满射:对于每一个y都有x与之对应 条件:|Y|<=|X| 3.双射:既是单射又是满射 条件:|X|=|Y| 代码实现 通过map函数建立映射 1.单射: map<int, int> BuildInjection(vector<int> src, vector<int> dst) { map&l
2021-03-31 22:30:41
2764
原创 map 函数的应用 原理
map函数的简介 map函数可以理解为一种关系映射 key值对应value值 且key是唯一的不能同一个键对应两个值 但是可以两个键对应一个值
2021-03-31 16:49:00
597
1
原创 通过类来实现集合的交 并 补 差 对称差
类的使用 离散 要求:使用类来实现集合的交 并 补 差 对称差 先声明一个学生类 class Student { private: int m_uiId; public: Student(); Student(int id); Student(const Student & student); Student & operator=(const Student & student); bool operator==(const Stud
2021-03-28 22:25:50
858
2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅