传送门:http://codeforces.com/contest/988/problem/D 题意: 在一堆数字中,找出尽量多的数字,使得这些数字的差都是2的指数次. 思路: 可以知道最多有三个,差值为2.4:或者是a[i],a[i]+2的k次,a[i]-2的k次: 两个就直接找. 一个随便输出一个. ac代码 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring…
Codeforces Round #486 (Div. 3) D. Points and Powers of Two 题目连接: http://codeforces.com/group/T0ITBvoeEx/contest/988/problem/D Description There are n distinct points on a coordinate line, the coordinate of i-th point equals to xi. Choose a subset of…
Codeforces Round #486 (Div. 3) F. Rain and Umbrellas 题目连接: http://codeforces.com/group/T0ITBvoeEx/contest/988/problem/E Description Polycarp lives on a coordinate line at the point x=0. He goes to his friend that lives at the point x=a. Polycarp can…
Codeforces Round #486 (Div. 3) E. Divisibility by 25 题目连接: http://codeforces.com/group/T0ITBvoeEx/contest/988/problem/E Description You are given an integer n from 1 to 10^18 without leading zeroes. In one move you can swap any two adjacent digits in…
Codeforces Round #486 (Div. 3) A. Diverse Team 题目连接: http://codeforces.com/contest/988/problem/A Description There are n students in a school class, the rating of the i-th student on Codehorses is ai. You have to form a team consisting of k students…
2018-02-25 http://codeforces.com/contest/940/problem/A A. Points on the line time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output We've got no test cases. A big olympiad is coming up. But the pr…
C. Points on Plane Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/576/problem/C Description On a plane are n points (xi, yi) with integer coordinates between 0 and 106. The distance between the two points with numbers a and…
A. Points and Segments (easy) Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/430/problem/A Description Iahub isn't well prepared on geometry problems, but he heard that this year there will be a lot of geometry problems on…
A. Points on the line time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output We've got no test cases. A big olympiad is coming up. But the problemsetters' number one priority should be adding anot…
水到家了 #include <iostream> #include <vector> #include <algorithm> using namespace std; struct Point{ int index, pos; Point(, ){ index = index_; pos = pos_; } bool operator < (const Point& a) const{ return pos < a.pos; } }; int ma…