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. 【反向并查集、联通图】P1197 [JSOI2008]星球大战

    题目描述 很久以前,在一个遥远的星系,一个黑暗的帝国靠着它的超级武器统治着整个星系. 某一天,凭着一个偶然的机遇,一支反抗军摧毁了帝国的超级武器,并攻下了星系中几乎所有的星球.这些星球通过特殊的以太隧 ...

  2. 洛谷P1107 & BZOJ1270 [BJWC2008]雷涛的小猫

    一道DP. 给你一个矩阵里面有很多数,你需要从上往下找到一种跳跃方法使得经过的点的价值之和最大. 具体题面见链接 洛谷P1107 BZOJ1270 很明显是一个二维的DP. #include<b ...

  3. 爬虫之BeautifulSoup库

    文档:https://beautifulsoup.readthedocs.io/zh_CN/latest/ 一.开始 解析库 # 安装解析库 pip3 install lxml pip3 instal ...

  4. 脚本开头,python预编译,控制台输入输出,for,while循环,分支判断,break,continue

    3. name = input("name:")与2.x中raw_input一回事, 注意接收的变量全部默认为字符串类型. 从控制台接收用户输入,而密文输入import getpa ...

  5. 离职 mark

    昨天(2019 年 5 月 17 日),从 离职. 从 2018 年 7 月 14 日早 10 点余分到 2019 年 5 月 17 日早 10 点余分,一共 308 天整.这就是我出学校的第一份工作 ...

  6. JS权威指南笔记1

    1.JavaScript数据类型可分为两种:原始类型和对象类型.原始类型下又包括数字.字符串和布尔值,以及null和undefined这两个特殊的:对象是属性的集合,且每个属性都有自己的"名 ...

  7. codevs 1296 营业额统计 (splay 点操作)

    题目大意 每次加入一个值,并且询问之前加入的数中与该数相差最小的值. 答案输出所有相差值的总和. 解题分析 = = 参考程序 #include <bits/stdc++.h> using ...

  8. O - Treats for the Cows 区间DP

    FJ has purchased N (1 <= N <= 2000) yummy treats for the cows who get money for giving vast am ...

  9. ubuntu无法update

    ubuntu系统执行sudo apt-get update报错解决方法: 编辑源列表文件 sudo vi /etc/apt/sources.list 将原来的列表删除,添加如下内容(中科大镜像源) d ...

  10. Oracle中的 row_number() over (partition by order by ) 用法

    oracle 里面经常这样用 select col1,col2..., row_number() over (partition by colx order by coly) from table_n ...