上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页
摘要: "题面带解释" hihoCoder感觉很好。 网络流的精华就是建图 cpp include include include include include using namespace std; struct node { int point; int weight; int nxt; }; no 阅读全文
posted @ 2018-05-14 19:04 Lance1ot 阅读(135) 评论(0) 推荐(0) 编辑
摘要: "网络流三·二分图多重匹配" 就是个模板 cpp include include include include using namespace std; struct node { int point; int nxt; int value; }; node line[500000]; int h 阅读全文
posted @ 2018-05-10 21:38 Lance1ot 阅读(133) 评论(0) 推荐(0) 编辑
摘要: "最大权闭合子图" 虽然我自己现在总结不好最大权闭合子图。但也算稍稍理解辣。 网络流起步ing~~~(~ ̄▽ ̄)~ cpp include include include include using namespace std; struct node { int point; int nxt; i 阅读全文
posted @ 2018-05-10 21:07 Lance1ot 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 最近在学A ,又因为某位大佬讲了一下k短路算法 所以就拿来练练。然而以我的能力,在考试中并不会考到。 题目是[SDOI2010]魔法猪学院。 然而luogu数据有加强。没有左偏堆过不了233 cpp // luogu judger enable o2 include include include 阅读全文
posted @ 2018-05-07 21:02 Lance1ot 阅读(453) 评论(0) 推荐(0) 编辑
摘要: 算初学吧.很裸的IDA cpp include include include include using namespace std; int map[6][6]; int aim[6][6]={ {0,0,0,0,0,0}, {0,1,1,1,1,1}, {0,0,1,1,1,1}, {0,0, 阅读全文
posted @ 2018-05-05 17:25 Lance1ot 阅读(290) 评论(0) 推荐(0) 编辑
摘要: P4035 [JSOI2008]球形空间产生器 "题目" 题目大意 给出n维空间上的n+1个点,且这些店都在一个圆的表面,求圈心坐标. 定义: 1. 球心:到球面上任意一点距离都相等的点。 2. 两点间距离公式 $$ A(x_1,x_2,x_3,x_4,\cdots x_n) $$ $$ B(y_1 阅读全文
posted @ 2018-04-29 12:25 Lance1ot 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 突然发现自己在线性筛素数中有这个,忘了好久; cpp include include using namespace std; long long num[10]={0,2,3,5,7,11,13,17,19}; long long mul(long long a,long long b,long 阅读全文
posted @ 2018-04-29 08:57 Lance1ot 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 怎么说呢? 因为是在mod 2 意义下的吗(一般是遇到二就可能是位运行算或二分图) 就可以利用异或计算。 因为奇数和偶数在二进制上就用判断最后一位就可以了 然后因为异或符合交换律和结合律 直接消元就可以辣 不过对于这个题,输出第一个数字可能是对与我这种蒟蒻的一个挑战。所以,我会在代码中详细的注释 " 阅读全文
posted @ 2018-04-28 16:02 Lance1ot 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 真·会了网络流,忘了匈牙利 一共两种颜色,很容易想到二分图劈配 虽然这题数据水 但是,数据强的话肯定会卡掉的。 为什么? 我暴力质因数都过了 我们可以在两边的数与质因数相连。然后跑网络流。 cpp include include include include include using names 阅读全文
posted @ 2018-04-28 10:26 Lance1ot 阅读(152) 评论(0) 推荐(0) 编辑
摘要: dinic 网络流 先利用bfs进行分层,然后再在上面跑dfs. 用的是dinic 具体还是看代码把 cpp include include include include include using namespace std; struct node { int point; int value 阅读全文
posted @ 2018-04-27 15:57 Lance1ot 阅读(126) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 22 下一页