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 ...
随机推荐
- Spring MVC和Struts2的比较[转]
虽然说没有系统的学习过Spring MVC框架, 但是工作这么长时间, 基本上在WEB层使用的都是Spring MVC, 自己觉得Struts2也是一个不错的WEB层框架, 这两种框架至今自己还未有比 ...
- JAVA遇上HTML-----JSP 篇基本概念
Java Web简介 1.什么是WEB应用程序: Web应用程序是一种可以通过Web访问的应用程序.Web应用程序的一个最大好处是用户很容易访问应用程序.用户只需要有浏览器即可,不需要再安装其他软件. ...
- (5)How to let go of being a "good" person — and become a better person
https://www.ted.com/talks/dolly_chugh_how_to_let_go_of_being_a_good_person_and_become_a_better_perso ...
- php接口 接受ios或android端图片; php接收NSData数据
备注下, [自己无意中用的方法]接收时,设置两个参数,一个是图片名称,另一个是实际文件.然后用$_FILES处理就可以了. 如: $icon = $_POST['icon'];//这个是图片的名称,用 ...
- laravel 5.1 使用Eloquent ORM 操作实例
Laravel 的 Eloquent ORM 提供了更优雅的ActiveRecord 实现来和数据库的互动. 每个数据库表对应一个模型文件. 数据库配置 .env文件(也可以直接修改config/da ...
- Docker网络简介
Docker允许通过外部访问容器或则容器互联的方式来提供网络服务. 外部访问容器 容器中可以运行一些网络应用,要让外部也可以访问这些应用,可以通过-P或则-P参数来指定断开映射.当使用 -P 标记时, ...
- 1.5sleep()方法
方法sleep()的作用是指在指定的毫秒数内让当前正在执行的线程休眠(暂停执行)这个正在执行的线程是指this.currentThread()返回的线程. 测试如下 package com.cky.t ...
- 基于脚本的nodemanager管理器
Step 6: Configure Node Manager on the Managed Servers虚拟机环境: 管理服务器IP:192.168.227.10 AdminServer 受管服务 ...
- C(m,n)算法
排列组合:C(m,n),m为给定数列,n为要从数列m中取元素的数量,GetResult()获取所有不重复的组合. public class MathCombination<T> { Lis ...
- KVM学习(初步安装与使用)
本机环境介绍 本次使用Vmware workstation 12 pro版本号为12.5.2 build-4638234.虚拟机操作系统版本如下 [root@node2 ~]# cat /etc/re ...