![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二分
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 · 523 阅读 · 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 · 261 阅读 · 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 · 595 阅读 · 0 评论