摘要: "传送门" 主席树裸题,考虑出现一半次数以上的数一定是这个区间的中位数,查询中位数再判断一下中位数出现的次数就好了 注意要离散化 代码: c++ include include include include using namespace std; void read(int &x) { char 阅读全文
posted @ 2019-03-31 21:55 蒟蒻--lichenxi 阅读(107) 评论(0) 推荐(0) 编辑
摘要: "传送门" 二元组建图 一共有四种二元关系,对于同选文和同选理的情况需要新开两个点来计算 代码: c++ include include include include include using namespace std; void read(int &x) { char ch; bool ok 阅读全文
posted @ 2019-03-31 17:13 蒟蒻--lichenxi 阅读(147) 评论(0) 推荐(0) 编辑
摘要: "传送门" 感觉这题好难呢,全程抄代码 题解就懒得写了,推出式子后暴力+剪枝。反正不是自己想的 就安利大佬的博客吧: "大佬的题解" 代码: 阅读全文
posted @ 2019-03-31 13:58 蒟蒻--lichenxi 阅读(150) 评论(0) 推荐(0) 编辑