题目链接 思路:列不等式组,然后解出不等式,得出答案的取值范围,最后取一个绝对值最小的答案就行了. #include<iostream> #include<cstdio> #include<algorithm> #include<cmath> using namespace std; const double eps=1e-8; struct data { int sj;//存售价 int xl;//存销量 }s[110000]; int main() {…
T1 化一下试子就ok code #include<cstdio> #include<algorithm> inline long long read() { long long x = 0,f = 1; char c = getchar(); while(c < '0' || c > '9') {if(c == '-')f = -1; c = getchar(); } while(c <= '9' && c >= '0') x = x *…