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 ...
随机推荐
- win/mac平台搭建ionic开发环境教程(转)
出处:http://www.ionic-china.com/doc/ionic-winmac.html#preface 前言 ionic中文网为大家准备了绿色版的nodejs和androidSDK以及 ...
- Spring实现AOP的多种方式
转载自:https://www.cnblogs.com/best/p/5736422.html:加了一些自己的注释: AOP(Aspect Oriented Programming)面向切面编程,通过 ...
- Kindeditor图片粘贴上传(chrome)
kindeditor4.1.x版本已支持图片批量上传,不过传统的选文件上传的方式依然效率低下. 很多时候,编辑人员可能需要将一个文档中图片上传到网上,那么,按照传统的上传方法,他必须先将图片另存为到本 ...
- 2.2.1synchronized方法的弊端
缺陷:用关键字synchronized声明方法是有弊端的,譬如A线程调用同步方法执行一个长时间的任务,那么B线程则必须等待较长的时间, 解决方法:使用synchronized同步语句块 package ...
- day18(javaEE三大组件之一servlet(简介(一)))
Servlet servlet是小型服务器语言,使用它可以处理前台传递来的信息,servlet进行处理后在响应给前台,其中servlet起到了关键性的作用.前端输入的信息可以持久化的存储在数据库中,并 ...
- uint8_t / uint16_t / uint32_t /uint64_t
这些数据类型是 C99 中定义的,它就是一个结构的标注,可理解为type/typedef的缩写,表示通过typedef定义.它们只是使用typedef给类型起的别名 #ifndef _UINT8_T ...
- io类型
非阻塞io from socket import * import time s=socket(AF_INET,SOCK_STREAM) s.bind(('127.0.0.1',8080)) s.li ...
- java基础-day25
第02天 java基础加强 今日内容介绍 u Properties的基本操作 u 反射综合案例 u BeanUtils概述及使用 第1章 Properties的基本操作 1.1 Properti ...
- node-lessons
教程:https://github.com/alsotang/node-lessons 0 nvm 的全称是 Node Version Manager,之所以需要这个工具,是因为 Node.js 的各 ...
- js五道经典练习题--第四道qq好友列表
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title>& ...