http://codeforces.com/problemset/problem/10/A

题很简单,就是题意难懂啊。。。

 #include <stdio.h>
#include <iostream>
#include <string.h>
using namespace std;
const int N=;
struct node
{
int l,r;
} g[N];
int main()
{
int n,p1,p2,p3,t1,t2;
while(cin>>n>>p1>>p2>>p3>>t1>>t2)
{
int sum = ;
for (int i = ; i <= n; i++)
{
cin>>g[i].l>>g[i].r;
sum+=(g[i].r-g[i].l)*p1;
}
for (int i = ; i <= n; i++)
{
int x = g[i].l-g[i-].r;
sum+=min(x,t1)*p1;
x-=min(x,t1);
sum+=min(x,t2)*p2;
x-=min(x,t2);
sum+=x*p3;
}
cout<<sum<<endl;
}
return ;
}

A. Power Consumption Calculation的更多相关文章

  1. Codeforces Beta Round #10 A. Power Consumption Calculation 水题

    A. Power Consumption Calculation 题目连接: http://www.codeforces.com/contest/10/problem/A Description To ...

  2. Codeforces 10A-Power Consumption Calculation(模拟)

    A. Power Consumption Calculation time limit per test 1 second memory limit per test 256 megabytes in ...

  3. Power consumption comparison

    Here is my draft evaluation when old MCU replacement for power consumption, the comparsion betwween ...

  4. Low Power Consumption Design --- MCU Attention

    20161008 note : I have a PCB board called 'A' where a piece of STM8L052C6 and a piece of CC1101 are ...

  5. 電池的標稱電壓 與 power consumption 量測

    電池標稱電壓 定義如下圖, 以25度為例,20度再往上點, 4V 放一下電就往下掉, 3V 放一下電就往下掉, 假設 3.8V 是擁有最多 capacity 可以 discharge 的電壓,放電放了 ...

  6. 手機 停充的種類 與 量測 power consumption 功率 使用 bq25896 bq25890

    Precondition : 配有 power path 功能的 BQ2589 手機. 接上 pc usb port. Origin : 今天有同事問我, 手機是否可以在接上 pc usb port ...

  7. power coefficient calculation -- post processing

    input: unscaled moment of one bladeoutput: power coefficient of a 3-blades wind/tidal turbine matlab ...

  8. Power aware dynamic scheduling in multiprocessor system employing voltage islands

    Minimizing the overall power conservation in a symmetric multiprocessor system disposed in a system- ...

  9. Multi-voltage和power gating的实现

    power domain:一个逻辑的集合体,包含power supply的一些信息.建立在FE. voltage area:chip上的一块物理区域.可以看作power domain的物理实现. Le ...

随机推荐

  1. JAVA基础——toString()方法

    toString()方法返回反映这个对象的字符串 因为toString方法是Object里面已经有了的方法,而所有类都是继承Object,所以“所有对象都有这个方法”. 它通常只是为了方便输出,比如S ...

  2. JavaScript day1(注释)

    JavaScript中的注释方式有两种: 单行注释,使用 //. // This is an in-line comment. 多行注释,以/*开始,用*/来结束. /* This is a mult ...

  3. Linux 下 Bash 脚本对拍

    背会... #!/bin/bash i= while true ;do ./maker > data.in ./a <data.in> data.out ./b <data.i ...

  4. notepad++使用NppFTP连接linux,编写shell脚本无法保存上传的问题

    下载安装NppFTP插件之后,重启打开notepad++连接到linux主机,之后进行编辑shell脚本,出现无法保存上传至linux主机的问题. 分析的原因:可能的原因是Windows防火墙阻止了应 ...

  5. [luoguP3565] [POI2014]HOT-Hotels(dfs)

    传送门 三点在树上距离相等的情况只有一种,就是以某一个点为中心,三个点到这个点的距离相等. 所以直接枚举每个点作为中心,dfs这个中心的子树,根据乘法原理统计答案即可. 时间复杂度 O(n2) (n ...

  6. RCC 2014 Warmup (Div. 2) 蛋疼解题总结

    A. Elimination time limit per test 1 second memory limit per test 256 megabytes input standard input ...

  7. 【故障处理】初始化数据时报600错误kcbz_check_objd_typ_3

    http://blog.itpub.net/519536/viewspace-661905/

  8. 武大OJ 622. Symmetrical

    Description          Cyy likes something symmetrical, and Han Move likes something circular. Han Mov ...

  9. 【CV论文阅读】action recognition by dense trajectories

    密集轨迹的方法是通过在视频帧上密集地采样像素点并且在追踪,从而构造视频的局部描述子,最后对视频进行分类的方法依然是传统的SVM等方法. 生成密集轨迹: (1)从8个不同的空间尺度中采样,它们的尺度差因 ...

  10. How can I add files to a Jar file? (or add a file to a zip archive)

    https://stackoverflow.com/questions/12239764/how-can-i-add-files-to-a-jar-file M.java class M{ publi ...