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 ...
随机推荐
- .Net 导出Excel时设置单元格的格式为文本类型
<td style= 'vnd.ms-excel.numberformat:@ ' align='right'>" & Format(Val(rowTitle.Item( ...
- 动态样式CSS
<link>标签可以把外部css样式引入HTML页面 <style>元素用于指定嵌入的样式 通过修改link的href属性,改变引入的css样式 function loadSt ...
- ng-show和ng-if的区别和使用场景
一.ng-show(ng-hide)和ng-if都是控制标签的显示和隐藏,为什么angularjs会定义两个指令来供我们使用呢,不多多说肯定有各自的使用场景,接下来我们看哈实际原理: ng-show实 ...
- CreateEvent( )——创建事件函数
/*************************************************************************************************** ...
- 小组spring计划列表
我们的会议地点:石家庄铁道大学三栋420. 每天进行会议的时间是早上七点钟. 会议内容:主要是讨论当日进行哪一个进程.
- JavaScript相关基础知识点
JavaScript简介: JavaScript是脚本语言,是一种轻量级的编程语言,是可插入 HTML 页面的编程代码,插入 HTML 页面后,可由所有的现代浏览器执行. JavaScript使用: ...
- noip第17课作业
1. 召见骑士 [问题描述] 某王国有5位骑士,每位骑士都有自己的编号,且这个王国的编号都为奇数,分别为1,3,5,7,9,在国王召见他们之前他们都必须经过只能从一边进出的长廊,长廊的宽度只能坐一个 ...
- Northwind测试学习用数据库
下载地址: https://northwinddatabase.codeplex.com/
- Codeforces822 B. Crossword solving
B. Crossword solving time limit per test 1 second memory limit per test 256 megabytes input standard ...
- Mahout简介
Mahout简介 一.mahout是什么 Apache Mahout是ApacheSoftware Foundation (ASF)旗下的一个开源项目,提供了一些经典的机器学习的算法,皆在帮助开发人员 ...