摘要:
【题目来源】https://www.luogu.com.cn/problem/P3377【题目描述】如题,一开始有 n 个小根堆,每个堆包含且仅包含一个数。接下来需要支持两种操作:1. 1 x y:将第 x 个数和第 y 个数所在的小根堆合并(若第 x 或第 y 个数已经被删除或第 x 和第 y 阅读全文
摘要:
【题目来源】https://www.acwing.com/problem/content/2716/【题目描述】你需要维护一个小根堆的集合,初始时集合是空的。该集合需要支持如下四种操作:● 1 a,在集合中插入一个新堆,堆中只包含一个数 a。● 2 x y,将第 x 个插入的数和第 y 个插入的数 阅读全文
摘要:
【Find the position of the first element that >=target】 //Find the position of the first element that >=target int ffir(vector<int>& v,int target) { au 阅读全文
摘要:
【题目来源】https://www.acwing.com/problem/content/4661/【题目描述】给定正整数 n,请问有多少个质数是 n 的约数。【输入格式】输入的第一行包含一个整数 n。【输出格式】输出一个整数,表示 n 的质数约数个数。【输入样例】396【输出样例】3【数据范围】 阅读全文