随笔分类 -  哈希表

摘要:problemsolutioncodes/*贪心1.找出不互质的数的集合,就是把互斥的数删去.2.那么当有两个互斥的数时,如果删掉前面(小)的,这个数后面的与它互斥的数也会入选,所以删掉后面的更优。3.因为每个数都是不同的。*/#include#include#inc... 阅读全文
posted @ 2018-06-05 21:18 gwj1139177410 阅读(216) 评论(0) 推荐(0)
摘要:problem给出n个正整数,然后有m个询问询问该整数是否在n个正整数中出现过solution哈希表? 当然是set水洛codes#include#includeusing namespace std;sets;int main(){ int n, m; ... 阅读全文
posted @ 2018-06-02 21:12 gwj1139177410 阅读(108) 评论(0) 推荐(0)

选择