随笔分类 -  OJ -- Codeforces

上一页 1 ··· 5 6 7 8 9 10 11 下一页
摘要:D. Nature Reserve 题目链接:https://codeforces.com/contest/1059/problem/D 题意: 在二维坐标平面上给出n个数的点,现在要求一个圆,能够容纳所有的点,并且与x轴相切的最小半径为多少。 题解: 容易知道圆的纵坐标的绝对值等于其半径,并且半径 阅读全文
posted @ 2019-02-18 22:47 heyuhhh 阅读(215) 评论(0) 推荐(0)
摘要:C. Sequence Transformation 题目链接:https://codeforces.com/contest/1059/problem/C 题意: 现在有1~n共n个数,然后执行下面操作: 1.求出余下数的gcd,然后将gcd加入答案队列; 2.从中任意删除一个数,如果余下数的个数大 阅读全文
posted @ 2019-02-18 22:39 heyuhhh 阅读(172) 评论(0) 推荐(0)
摘要:D. Sum in the tree 题目链接:https://codeforces.com/contest/1099/problem/D 题意: 给出一棵树,以及每个点的si,这里的si代表从i号结点到根节点的权值和。但是有些si=-1,这就相当于丢失了当前结点的数据。 假设原本每个点的权值为ai 阅读全文
posted @ 2019-02-18 22:21 heyuhhh 阅读(180) 评论(0) 推荐(0)
摘要:Codeforces Round #539 (Div. 2) 题目链接:https://codeforces.com/contest/1113 A. Sasha and His Trip 题意: n个城市,城市分布在一条直线上且按升序排序,现在有个人开车从一号城市出发,车的油箱容量为v。 在每个城市 阅读全文
posted @ 2019-02-17 20:55 heyuhhh 阅读(183) 评论(0) 推荐(0)
摘要:Codeforces Round #538 (Div. 2) 题目链接:https://codeforces.com/contest/1114 A. Got Any Grapes? 题意: 有三个人,有三种食物,食物对应的数量为a,b,c,三个人需要的食物量分别为x,y,z。 现在第一个人只吃第一种 阅读全文
posted @ 2019-02-11 14:07 heyuhhh 阅读(396) 评论(0) 推荐(0)
摘要:Codeforces Global Round 1 题目链接:https://codeforces.com/contest/1110 A. Parity 题意: 给出{ak},b,k,判断a1*b^(k-1)+a2*b^(k-2)+...+ak*b^0的奇偶性。 题解: 暴力求模2意义下的值就好了。 阅读全文
posted @ 2019-02-08 17:09 heyuhhh 阅读(412) 评论(0) 推荐(0)
摘要:D. Compression 题目链接:https://codeforces.com/contest/1107/problem/D 题意: 给出一个n*(n/4)的矩阵,这个矩阵原本是一些01矩阵,但是现在四个四个储存进二进制里面,现在给出的矩阵为0~9以及A~F,表示0~15。 然后问这个矩阵能否 阅读全文
posted @ 2019-02-05 14:50 heyuhhh 阅读(242) 评论(0) 推荐(0)
摘要:Codeforces Round #535 (Div. 3) 题目总链接:https://codeforces.com/contest/1108 太懒了啊~好久之前的我现在才更新,赶紧补上吧,不能漏掉了。 A. Two distinct points 题意: 给出两个区间的左右边界,输出两个数,满足 阅读全文
posted @ 2019-02-05 10:54 heyuhhh 阅读(250) 评论(0) 推荐(0)
摘要: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 阅读(158) 评论(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 阅读(169) 评论(0) 推荐(0)
摘要:D. Cutting Out 题目链接:https://codeforces.com/contest/1077/problem/D 题意: 给你n个数,现在要你选k个数出来,并且能够从这n个数种选取尽量多的这k个数。 题解: 一开始想的贪心+模拟,然后写崩了... 其实这个题二分一下选几组就好了,因 阅读全文
posted @ 2019-01-20 12:01 heyuhhh 阅读(122) 评论(0) 推荐(0)
摘要:E. Binary Numbers AND Sum 题目链接:https://codeforces.com/contest/1066/problem/E 题意: 给出两个用二进制表示的数,然后将第二个二进制不断地往右边移一位,每次答案加上这两个的交集,求最后的答案。 题解: 考虑第二个二进制每一位对 阅读全文
posted @ 2019-01-20 11:55 heyuhhh 阅读(102) 评论(0) 推荐(0)
摘要:B. Vitamins 题目链接:https://codeforces.com/contest/1042/problem/B 题意: 给出几种药,没种可能包含一种或多种(最多三种)维生素,现在问要吃到这三种维生素买药最少花费是多少。 题解: 嗯...可以直接暴力: #include <bits/st 阅读全文
posted @ 2019-01-20 11:51 heyuhhh 阅读(158) 评论(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 阅读(204) 评论(0) 推荐(0)
摘要:Codeforces Round #532 (Div. 2) 题目总链接:https://codeforces.com/contest/1100 A. Roman and Browser 题意: 给出由-1和1组成的n个数,现在任意选定一个起点,从起点开始向左向右k个k个地拿走。最后问abs(cnt 阅读全文
posted @ 2019-01-15 17:27 heyuhhh 阅读(257) 评论(0) 推荐(0)
摘要:Educational Codeforces Round 58 (Rated for Div. 2) 题目总链接:https://codeforces.com/contest/1101 A. Minimum Integer 题意: 多组数据,给你三个数l,r,d,要求在区间[l,r]之外找一个最小的 阅读全文
posted @ 2019-01-13 15:01 heyuhhh 阅读(395) 评论(0) 推荐(0)
摘要:F. Elongated Matrix 题目链接:https://codeforces.com/contest/1102/problem/F 题意: 给出一个n*m的矩阵,现在可以随意交换任意的两行,最后从上到下,从左到右形成一个序列s1,s2.....snm,满足对于任意相邻的两个数,它们差的绝对 阅读全文
posted @ 2019-01-10 20:38 heyuhhh 阅读(283) 评论(0) 推荐(0)
摘要:Codeforces Round #531 (Div. 3) 题目总链接:https://codeforces.com/contest/1102 A. Integer Sequence Dividing 题意: 给一个数n,然后要求你把1,2.....n分为两个集合,使得两个集合里面元素的和的差的绝 阅读全文
posted @ 2019-01-10 12:19 heyuhhh 阅读(255) 评论(1) 推荐(0)
摘要:Good Bye 2018! 题目链接:https://codeforces.com/contest/1091 A. New Year and the Christmas Ornament 题意: 给出三堆数量分别为y,b,r的东西,现在要你从三堆中各选一堆,满足y'+1=b'且b'+1=r' (y 阅读全文
posted @ 2019-01-03 22:31 heyuhhh 阅读(287) 评论(0) 推荐(0)
摘要:题目总链接:https://codeforces.com/contest/1096 A. Find Divisible 题意: 给出l,r,在[l,r]里面找两个数x,y,使得y%x==0,保证有解。 题解: 直接输出l,2*l就好啦,但我还是写了个循环... 代码如下: #include <bit 阅读全文
posted @ 2019-01-02 21:30 heyuhhh 阅读(251) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 11 下一页