摘要: 重载结构体中的大于小于符号 重载结构体中的大于小于符号,为了方便sort或者优先队列priority_queue的使用。 其实只用重载其中的小于符号即可。 正常次序的重载: struct node{ int w; bool operator <(const node a)const{//记住!!! 阅读全文
posted @ 2021-05-31 14:23 ACHanHan 阅读(476) 评论(0) 推荐(1) 编辑
摘要: 差分约束 (1) 求不等式组的可行解 ? 步骤: ? [1] 先将a56爆大奖在线娱乐不等式 xi < = xj + ck 转换成一条从xj 走到 xi ,长度为ck的一条边 即a56爆大奖在线娱乐为 离源点距离dist[i]<=dist[j]+ck ? [2] 找一个超级源点,使得该源点一定可以遍历到所有边。 ? [3]从源点求 阅读全文
posted @ 2021-05-31 00:22 ACHanHan 阅读(44) 评论(0) 推荐(0) 编辑