队友和大佬都什么几种情况啥的……我是把终点都插了,起点随便选一个,暴举答案莽A. ; ll n, k, a, b, aa, minn = INF, maxx = -; set<ll> bb; ll gcd(ll a, ll b) { return b ? gcd(b, a % b) : a; } int main() { cin >> n >> k >> a >> b; ll T = n * k; rep(i, , n - ) { ll p =…
A. 序列 考场不认真读题会死..... 读清题就很简单了,分成若干块,然后块内递增,块外递减,同时使最大的块长为$A$ B. 购物 考场思路太局限了,没有发现性质, 考虑将$a_{i}$,排序前缀和为$sum_{i}$,发现如果存在断区肯定处于$sum_{i-1},a_{i}/2$之间 C. 计数 很不错的题,$rvalue$学长的题解写的很清楚 需要进行性质分析: 对于先序遍历,需要保证每个子数的节点编号是连续的,同时左儿子的编号是根的编号$+1$; 那么进行题意的转化: 对于每一对限定的点…
Treasure Hunt time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Captain Bill the Hummingbird and his crew recieved an interesting challenge offer. Some stranger gave them a map, potion of tel…