POJ 2601
#include<iostream>
#include<iomanip>
#include<stdio.h>
using namespace std; int main()
{
//freopen("acm.acm","r",stdin);
int n;
int i;
double * a;
double * c;
cin>>n;
a = new double[n+];
c = new double[n]; cin>>a[]>>a[n+];
for(i = ; i < n; ++ i)
{
cin>>c[i];
}
a[] = n*a[] + a[n+];
for(i = ; i < n; ++ i)
{
a[] -= *(n - i)*c[i];
}
cout<<setiosflags(ios::fixed)<<setprecision()<<a[]/(n+)<<endl;
}
POJ 2601的更多相关文章
- poj 2601 Simple calculations
Simple calculations Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6559 Accepted: 32 ...
- 【POJ】【2601】Simple calculations
推公式/二分法 好题! 题解:http://blog.csdn.net/zck921031/article/details/7690288 这题明显是一个方程组……可以推公式推出来…… 然而这太繁琐了 ...
- POJ 3370. Halloween treats 抽屉原理 / 鸽巢原理
Halloween treats Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 7644 Accepted: 2798 ...
- POJ 2356. Find a multiple 抽屉原理 / 鸽巢原理
Find a multiple Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7192 Accepted: 3138 ...
- POJ 2965. The Pilots Brothers' refrigerator 枚举or爆搜or分治
The Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 22286 ...
- POJ 1753. Flip Game 枚举or爆搜+位压缩,或者高斯消元法
Flip Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 37427 Accepted: 16288 Descr ...
- POJ 3254. Corn Fields 状态压缩DP (入门级)
Corn Fields Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 9806 Accepted: 5185 Descr ...
- POJ 2739. Sum of Consecutive Prime Numbers
Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 20050 ...
- POJ 2255. Tree Recovery
Tree Recovery Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11939 Accepted: 7493 De ...
随机推荐
- 关于Cell中的各种值的类型判断
switch (cell.getCellType()){ case Cell.CELL_TYPE_NUMERIC: //数字 cellValue = stringDateProcess(cell); ...
- Unable to fetch some archives ,maybe run apt-get update or try with --fix-missing?
今天在liunx下要解压zip包时,发现系统里面没有装unzip包,于是就运行sudo apt-get install unzip,可是总是没办法安装,于是上网找原因,有的说源文件需要修改,于是就运行 ...
- Ubuntu 16.04 搭建LAMP服务器环境流程
http://www.linuxidc.com/Linux/2016-09/135629.htm [安装mysql时 只需安装 mysql-server无需安装mysql-client] mysql ...
- Win10通知区域图标设置;windows10系统图标合并;Windows10系统通知合并
1.一直喜欢Windows7的通知图标合并 2.通过查阅找到方法 a.输入命令语句 win+R :shell:::{05d7b0f4-2121-4eff-bf6b-ed3f69b894d9} 回 ...
- tinyweb集成springmvc 的一种可行方式
最近tiny项目中集成了springmvc,而且使用的tiny的版本比较低,所以整合起来官网给的前两种方式都行不通. 而且有个tiny整合springmvc的maven依赖都下载不了.所以只有使用第三 ...
- mysql主从复制Error1205
主从架构.今天发现从库SQL线程报错,主从复制停止了.查看错误发现: Last_SQL_Errno: 1205 Last_SQL_Error: Slave SQL thread ...
- jquery的bind()和trigger()
本文主要介绍JQuery的trigger()和bind()方法. 1. $(selector).bind(event,data,function)方法为被选元素添加一个或多个事件处理程序,并规定事 ...
- poj 2506 Tiling(高精度)
Description In how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles? Here is a sample tili ...
- Ubuntu 12.04 下安装 JDK 7
原文链接:http://hi.baidu.com/sanwer/item/370a23330a6a7b23b3c0c533 方法一1.下载 JDK 7从http://www.oracle.com/te ...
- 从MS Word到Windows Live Writer
在做笔记的时候,喜欢使用Word进行排版及插入图片,但是当将笔记发布的时候,一般的网站是不支持直接将Word中的图片进行上传的,此时使用Windows Live Writer是一个不错的选择. 可是, ...