
二分
cherish__lin
I want to be better!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C. Match Points(二分答案)
You are given a set of pointsx1x1,x2x2, ...,xnxnon the number line. Two pointsiiandjjcan be matched with each other if the following conditions hold: neitheriinorjjis matched with any ot...原创 2019-05-02 22:04:13 · 613 阅读 · 0 评论 -
L - Little Difference Gym - 101612L(二分答案)
题目链接:http://codeforces.com/gym/101612/attachments 题解: 先考虑到特殊情况:如果该数是n的次幂的话,肯定能分解成任意个1与对应个2的乘积,此时输出-1。 在考虑下题意,该数只能被分解成a^len或a^i*(a+1)*(len-i),由于n达到1e18,与2的60次方接近,即分解式中最多包含60位左右,不妨枚举到64,那么我们可以二分每个分解...原创 2019-05-08 20:17:39 · 307 阅读 · 0 评论 -
D. Almost All Divisors
We guessed some integer numberxx. You are given a list ofalmost allits divisors.Almost allmeans that there areall divisors except11andxxin the list. Your task is to find the minimum possible...原创 2019-05-16 22:45:48 · 752 阅读 · 0 评论