10 2020 档案

摘要:[题目]https://ac.nowcoder.com/acm/contest/7501/A 题意:选出最多数量的数,这组数两两是倍数关系。 解法:1、很容易想到用dp[i]去更新i的倍数,但是会TLE,可以稍作优化,只需更新i的素数倍。比如4,如果只更新素数倍暂时就不会更新到4,而是通过22的方式 阅读全文
posted @ 2020-10-25 20:37 无名菜鸟1 阅读(284) 评论(0) 推荐(1)
摘要:https://www.acwing.com/problem/content/11/ 01背包最优解计数 #include<bits/stdc++.h> using namespace std ; const int N = 1009 , mod = 1e9 + 7; int dp[N] , cnt 阅读全文
posted @ 2020-10-13 17:35 无名菜鸟1 阅读(109) 评论(0) 推荐(0)
摘要:题目 题意:询问任意区间第k小数 #include<bits/stdc++.h> using namespace std ; const int N = 100010 ; int n , m , sz , len , a[N] , b[N] , p; int rt[N<<5] ;//记录第i棵权值线 阅读全文
posted @ 2020-10-12 10:56 无名菜鸟1 阅读(70) 评论(0) 推荐(0)
摘要:http://keyblog.cn/article-47.html https://blog.csdn.net/wang57389675/article/details/45895473 https://www.cnblogs.com/ECJTUACM-873284962/p/6398385.htm 阅读全文
posted @ 2020-10-08 15:47 无名菜鸟1 阅读(101) 评论(0) 推荐(0)