【微积分】CodeForces 185B Mushroom Scientists
来源:互联网 发布:旅游策划师 知乎 编辑:程序博客网 时间:2024/05/19 09:14
题目链接
f=a*ln(x)+b*ln(y)+c*ln(z)+λ*(S-x-y-z)
fx’=a/x+λ;
fy’=b/y+λ;
fz’=c/z+λ;
fλ’=S-x-y-z;
#include <cstdio>#include <cstring>#include <cstdlib>#include <string>#include <iostream>#include <algorithm>#include <sstream>#include <cmath>using namespace std;#include <queue>#include <stack>#include <vector>#include <deque>#include <set>#include <map>#define cler(arr, val) memset(arr, val, sizeof(arr))typedef long long LL;const int MAXN = 191;const int MAXM = 11111;const int INF = 0x3f3f3f3f;const LL mod =1000000007;#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1int s,a,b,c;int main(){ cin>>s>>a>>b>>c; int sum=a+b+c; if(sum==0) printf("%d 0 0\n",s); else printf("%.10lf %.10lf %.10lf\n",a*1.0/sum*s,b*1.0/sum*s,c*1.0/sum*s); return 0;}
0 0
- 【微积分】CodeForces 185B Mushroom Scientists
- 【水分配】codeforces 185B (#118 D)- Mushroom Scientists
- CodeForces Round #118 - Mushroom Scientists
- codeforces 186D Mushroom Scientists 不等式
- Mushroom Scientists
- Mushroom Scientists(Codeforce)
- Codeforces Round #118 (Div. 1) A Mushroom Scientists (多元函数极值问题+拉格朗日乘数法)
- Codeforces Round #118 (Div. 1) A Mushroom Scientists (多元函数极值问题+拉格朗日乘数法)
- 【codeforces】#99 E Mushroom Gnomes - 2
- 用Python学《微积分B》(微积分应用)
- codeforces 60C Mushroom Strife ——DFS
- CodeForces 60 E.Mushroom Gnomes(矩阵快速幂)
- 用Python学《微积分B》(序)
- 用Python学《微积分B》(微分方程)
- 微积分
- 微积分
- 微积分
- 微积分
- jsp 返回并刷新上一页
- Rotate List
- 线程特定数据 Thread Specified Data
- Mysql中的注释
- 立场声明--“没有丑女人只有懒女人;没有牛X的人,勤奋的你会比他更牛X”
- 【微积分】CodeForces 185B Mushroom Scientists
- 使用corosync+pacemaker构建高可用集群(转)
- intent传递对象——序列化
- Loading Large Bitmaps Efficiently
- 点滴积累
- 快餐生活时代
- Android通过POST方式传递数据到服务器简单demo
- bootstrap兼容IE6、7、8版本(IE9以下版本)
- 自测4. Have Fun with Numbers