摘要: F1. Pictures with Kittens (easy version) 题目链接:https://codeforces.com/contest/1077/problem/F1 题意: 给出n个数,以及k,x,k即长度为k的区间至少选一个,x的意思是一共要选x个,少一个或者多一个都不行。 选 阅读全文
posted @ 2019-01-20 13:14 heyuhhh 阅读(141) 评论(0) 推荐(0) 编辑
摘要: E. Thematic Contests 题目链接:https://codeforces.com/contest/1077/problem/E 题意: 给出n个数,然后你可以规定一个基数x,第一次选x个相同的数出来,第二次选2*x出来,第三次选4*x个出来....问最后最多选多少个数出来。 题解: 阅读全文
posted @ 2019-01-20 12:53 heyuhhh 阅读(141) 评论(0) 推荐(0) 编辑
摘要: D. Cutting Out 题目链接:https://codeforces.com/contest/1077/problem/D 题意: 给你n个数,现在要你选k个数出来,并且能够从这n个数种选取尽量多的这k个数。 题解: 一开始想的贪心+模拟,然后写崩了... 其实这个题二分一下选几组就好了,因 阅读全文
posted @ 2019-01-20 12:01 heyuhhh 阅读(108) 评论(0) 推荐(0) 编辑
摘要: E. Binary Numbers AND Sum 题目链接:https://codeforces.com/contest/1066/problem/E 题意: 给出两个用二进制表示的数,然后将第二个二进制不断地往右边移一位,每次答案加上这两个的交集,求最后的答案。 题解: 考虑第二个二进制每一位对 阅读全文
posted @ 2019-01-20 11:55 heyuhhh 阅读(90) 评论(0) 推荐(0) 编辑
摘要: B. Vitamins 题目链接:https://codeforces.com/contest/1042/problem/B 题意: 给出几种药,没种可能包含一种或多种(最多三种)维生素,现在问要吃到这三种维生素买药最少花费是多少。 题解: 嗯...可以直接暴力: #include <bits/st 阅读全文
posted @ 2019-01-20 11:51 heyuhhh 阅读(148) 评论(0) 推荐(0) 编辑
摘要: D. Petya and Array 题目链接:https://codeforces.com/contest/1042/problem/D 题意: 给出n个数,问一共有多少个区间,满足区间和小于t。 题解: 假设目前区间右端点为r,左端点为l,那么由前缀和可得知:sumr-suml-1<t,然后我们 阅读全文
posted @ 2019-01-20 11:47 heyuhhh 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Codeforces Round #506 (Div. 3) 题目总链接:https://codeforces.com/contest/1029 A. Many Equal Substrings 题意: 给出长度为n的字符串,然后要求你添加一些字符,使得有k个这样的字符串。 题解: 直接暴力吧... 阅读全文
posted @ 2019-01-20 10:04 heyuhhh 阅读(194) 评论(0) 推荐(0) 编辑