二分. #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define maxn 200500 #define inf 3000000000LL using namespace std; long long t,n,s[maxn],e[maxn],d[maxn],cnt; long long find(long long x) { ; ;i<=n;i++…
[题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=1271 [算法] 二分 [代码] #include<bits/stdc++.h> using namespace std; #define MAXN 200100 int T,i,n,ans; long long l,r,mid; long long s[MAXN],d[MAXN],e[MAXN]; inline long long calc(long long x) { int…