该文被密码保护。 阅读全文
posted @ 2018-01-29 22:11 啊宸 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 传送门 最小费用最大流。 每天拆成两个点,i表示用完的餐巾,i+n表示干净的餐巾。 s向i连容量为ri费用为0的边,表示每天用脏的ri条餐巾。 i+n向t连容量为ri费用为0的边,表示每天需要用ri条餐巾。 s向1+n连容量为inf费用为p的边,表示新买进的干净餐巾,需要新买的在第一天全买了。 两种 阅读全文
posted @ 2018-01-29 19:12 啊宸 阅读(164) 评论(0) 推荐(0) 编辑
摘要: 传送门 传送门 exbsgs模板。 //Achen #include<algorithm> #include<iostream> #include<cstring> #include<cstdlib> #include<vector> #include<cstdio> #include<queue> 阅读全文
posted @ 2018-01-29 18:03 啊宸 阅读(143) 评论(0) 推荐(0) 编辑