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. HTML5大数据可视化效果(一)彩虹爆炸图

    前言 25年过去了,Brooks博士著名的“没有银弹”的论断依旧没有被打破.HTML5也是一样.但这并不妨碍HTML5是一个越来越有威力的“炸蛋”:发展迅速.势不可挡.随着HTML5技术的普及,用HT ...

  2. 「 poj 2096 」 Collecting Bugs

    先说一下题意 $s$ 个子系统还中有 $n$ 种 $\text{bug}$,每天可以随机选择一种 $\text{bug}$,问选出 $n$ 种 $\text{bug}$ 在 $s$ 种子系统中的期望天 ...

  3. 1054.求平均数-PAT乙级真题

    从其他博客优秀代码中学到了些技巧,记录一下. 思路:使用sscanf和sprintf函数. sscanf() – 从一个字符串中读进与指定格式相符的数据 sprintf() – 字符串格式化命令,主要 ...

  4. Fleecing the Raffle(NCPC 2016 暴力求解)

    题目: A tremendously exciting raffle is being held, with some tremendously exciting prizes being given ...

  5. python经典书籍:Python编程实战 运用设计模式、并发和程序库创建高质量程序

    Python编程实战主要关注了四个方面 即:优雅编码设计模式.通过并发和编译后的Python(Cython)使处理速度更快.高层联网和图像.书中展示了在Python中已经过验证有用的设计模式,用专家级 ...

  6. 【tips】xadmin - django第三方后台管理系统

    Django 为大家提供了一个完善的后台管理系统—admin,但是这个后台管理系统总体来说不太适合国人的习惯,所以有大神就使用 bootstrap 和 jQuery,为我们开发了一个第三 方的 Dja ...

  7. 【Codeforces 924C】Riverside Curio

    [链接] 我是链接,点我呀:) [题意] 题意 [题解] 设第i天总共的线数为t[i] 水平线上线数为m[i]是固定的 水平线下的线数设为d[i] 则d[i]+m[i]+1=t[i] 也就是说问题可以 ...

  8. css & no margin & print pdf

    css & no margin & print pdf no header & no footer https://stackoverflow.com/questions/46 ...

  9. HDU——3579 Hello Kiki

    Hello Kiki Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total ...

  10. mysql模糊查询语句

    select * from tbl_actor where first_char like 'p%' order by first_char;