摘要: 这个题一眼看上去不会 然后有人说是网络流 然后我就想怎么建图啊,然后不会(是本蒟蒻太垃圾了),肯定有网络流解法 然后去群里问了gdut的巨巨,他说他队友爆搜+剪枝过了(我也是非常的叹服) 然后我也写了一个2^50的搜索剪枝,居然真过了(不知道是数据弱还是大力出奇迹) #include <cstdio 阅读全文
posted @ 2016-06-18 21:29 shuguangzw 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 分析:开个1000*1000的数组,预处理矩阵和,然后分类讨论就好 时间复杂度:O(n) #include <cstdio> #include <iostream> #include <ctime> #include <vector> #include <cmath> #include <map> 阅读全文
posted @ 2016-06-18 09:42 shuguangzw 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 分析:因为加起来不超过1e6,所以最多有1000+个不同的数 做法:离散化搞就好了 #include <cstdio> #include <iostream> #include <ctime> #include <vector> #include <cmath> #include <map> #in 阅读全文
posted @ 2016-06-18 09:40 shuguangzw 阅读(219) 评论(0) 推荐(0) 编辑