摘要: 题目大意 给出 \(n\),求一组 \(x,y,z\) 满足 \(\frac 1x + \frac 1y + \frac 1z = \frac 2n\) 若不存在合法的解,输出 \(-1\) 其中 \(n \le 10^4\) 要求答案中的 \(x,y,z \le 2*10^9\) 思路 让人无语的 阅读全文
posted @ 2020-02-22 19:22 leiyuanze 阅读(149) 评论(0) 推荐(0)
摘要: 代码 阅读全文
posted @ 2020-02-22 18:27 leiyuanze 阅读(118) 评论(0) 推荐(0)
摘要: 代码 #include<cstdio> using namespace std; const int N = 1e5; double fx[N + 5] , fy[N + 5] , g[N + 5]; int x , y; inline void getp(int n , double f[] , 阅读全文
posted @ 2020-02-22 18:25 leiyuanze 阅读(107) 评论(0) 推荐(0)
摘要: 题目大意 构造一个分段函数来拟合若干点($x_i , y_i$),每一段是一个常函数,即 $$ f(x)= \left \{ \begin{aligned} a_1& & (0\leq x include using namespace std; const int N = 1e6; int n , 阅读全文
posted @ 2020-02-22 18:23 leiyuanze 阅读(223) 评论(0) 推荐(0)