上一页 1 ··· 206 207 208 209 210 211 212 213 214 ··· 223 下一页
摘要: 【题目链接】:https://csacademy.com/contest/round-36/task/safe-spots/【题意】 给你n个数字构成的序列; 每个位置上的数都由0和1组成; 对于每个0; 假设其位置为i; 如果[i-k..i+k]这个范围内1的个数不超过1,则称它... 阅读全文
posted @ 2017-10-04 18:44 AWCXV 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 【题目链接】:https://csacademy.com/contest/round-36/task/bicycle-rental/【题意】 让你从n辆车中选一辆车; 每一辆车有3个属性 1.到达车的身边的时刻 2.车什么时候开始能够被使用 3.车到达它家所需时间; 问你到家的最早... 阅读全文
posted @ 2017-10-04 18:44 AWCXV 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 【题目链接】:http://codeforces.com/contest/822/problem/D【题意】 有n个人参加选美比赛; 要求把这n个人分成若干个相同大小的组; 每个组内的人数是相同的; 然后每个组内的人,两两比较; 每个组得出最美的人; 然后每个组中最美的人再重复上述... 阅读全文
posted @ 2017-10-04 18:44 AWCXV 阅读(57) 评论(0) 推荐(0) 编辑
摘要: 接上一篇文章; 这里直接把左端点和右端点映射到vector数组上; 映射一个open和close数组; 枚举1..2e5 如果open[i]内有安排; 则用那个安排和dp数组来更新答案; 更新答案完之后,如果有close数组 则把close数组里面的安排用来更新dp数组; #inc... 阅读全文
posted @ 2017-10-04 18:44 AWCXV 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 【题目链接】:http://codeforces.com/contest/822/problem/C【题意】 有n个旅行计划, 每个旅行计划以开始日期li,结束日期ri,以及花费金钱costi描述; 让你在这n个旅行计划中选出两个计划; 要求这两个计划的日期没有相交的部分; 且这两... 阅读全文
posted @ 2017-10-04 18:44 AWCXV 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 【题目链接】:http://codeforces.com/contest/822/problem/B【题意】 让你用s去匹配t,问你最少需要修改s中的多少个字符; 才能在t中匹配到s; 【题解】 O(n2)的暴力搞就好; 【Number Of WA】 1 【反思】 一开始... 阅读全文
posted @ 2017-10-04 18:44 AWCXV 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 【题目链接】:http://codeforces.com/contest/822/problem/A【题意】 让你求a!和b!的gcd min(a,b)using namespace std;#define lson l,m,rt= b;i--)#define mp make_pa... 阅读全文
posted @ 2017-10-04 18:44 AWCXV 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 【题目链接】:http://acm.hdu.edu.cn/showproblem.php?pid=4135【题意】 让你求a..b中与n互质的数的个数. 【题解】 可以用前缀和转化为求1..x内与n互质的数的个数; 先求出n的所有的质因子; 然后设1..x内为第i个质因子的倍数的... 阅读全文
posted @ 2017-10-04 18:44 AWCXV 阅读(81) 评论(0) 推荐(0) 编辑
摘要: 【题目链接】:http://acm.uestc.edu.cn/#/problem/show/1544【题意】 【题解】 容斥原理题; 1..(2^m)-1枚举 设k为其二进制形式中1的个数; k为奇数 ans+=2^(k-1)*(n/lcm(对应的k个数)) 否则-=….. 如果不... 阅读全文
posted @ 2017-10-04 18:44 AWCXV 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Problem StatementYou are given two ints: n and m. Let D be the number of permutations of the set {1,2,…,n+m} such that the first m values are ... 阅读全文
posted @ 2017-10-04 18:44 AWCXV 阅读(107) 评论(0) 推荐(0) 编辑
上一页 1 ··· 206 207 208 209 210 211 212 213 214 ··· 223 下一页