A. Power Consumption Calculation
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的更多相关文章
- Codeforces Beta Round #10 A. Power Consumption Calculation 水题
A. Power Consumption Calculation 题目连接: http://www.codeforces.com/contest/10/problem/A Description To ...
- Codeforces 10A-Power Consumption Calculation(模拟)
A. Power Consumption Calculation time limit per test 1 second memory limit per test 256 megabytes in ...
- Power consumption comparison
Here is my draft evaluation when old MCU replacement for power consumption, the comparsion betwween ...
- 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 ...
- 電池的標稱電壓 與 power consumption 量測
電池標稱電壓 定義如下圖, 以25度為例,20度再往上點, 4V 放一下電就往下掉, 3V 放一下電就往下掉, 假設 3.8V 是擁有最多 capacity 可以 discharge 的電壓,放電放了 ...
- 手機 停充的種類 與 量測 power consumption 功率 使用 bq25896 bq25890
Precondition : 配有 power path 功能的 BQ2589 手機. 接上 pc usb port. Origin : 今天有同事問我, 手機是否可以在接上 pc usb port ...
- power coefficient calculation -- post processing
input: unscaled moment of one bladeoutput: power coefficient of a 3-blades wind/tidal turbine matlab ...
- Power aware dynamic scheduling in multiprocessor system employing voltage islands
Minimizing the overall power conservation in a symmetric multiprocessor system disposed in a system- ...
- Multi-voltage和power gating的实现
power domain:一个逻辑的集合体,包含power supply的一些信息.建立在FE. voltage area:chip上的一块物理区域.可以看作power domain的物理实现. Le ...
随机推荐
- C++ 类的初始化列表
class Animal{public: Animal(int weight,int height): //A初始化列表 m_weight(weight), m_height(height) { } ...
- 洛谷——P1594 护卫队
P1594 护卫队 题目描述 护卫车队在一条单行的街道前排成一队,前面河上是一座单行的桥.因为街道是一条单行道,所以任何车辆都不能超车.桥能承受一个给定的最大承载量.为了控制桥上的交通,桥两边各站一个 ...
- POJ P2096 Collecting Bugs
思路 分类讨论,不妨先设$DP[i][j]$表示已经发现$i$种子系统中有$n$种$bug$无非只有四种情况 发现的$bug$在旧的系统旧的分类,概率$p1$是$(i/s)*(j/n)$. 发现的$b ...
- World Cup(The 2016 ACM-ICPC Asia China-Final Contest dfs搜索)
题目: Here is World Cup again, the top 32 teams come together to fight for the World Champion. The tea ...
- mysql连接错误解决(ERROR 2049 (HY000): Connection using old (pre-4.1.1) authentication protocol ref used (client option 'secure_auth' enabled))
当使用mysql的新版本是,连接老版本的mysql,就会有可能报: ERROR 2049 (HY000): Connection using old (pre-4.1.1) authenticatio ...
- LINUX-APT 软件工具 (Debian, Ubuntu 以及类似系统)
apt-get install package_name 安装/更新一个 deb 包 apt-cdrom install package_name 从光盘安装/更新一个 deb 包 apt-get u ...
- v-on(事件处理)
1.监听事件 v-on:click="msg+=1" (msg是写在data里) 2.方法事件处理器 v-on:click = "jia" (jia是写在me ...
- Codeforces 158B (数学)
B. Mushroom Scientists time limit per test 2 seconds memory limit per test 256 megabytes input stand ...
- vue组件知识总结
vue组件化开发 将一个页面分割成若干个组件,一个页面js+css+html,将自己类容分割出来,方便开发,更好了维护我们的代码,每个组件封装自己的js+html+css,样式命名冲突 组件分类 页面 ...
- J2EE 课件3 JSP标记
•JSP标记包括指令标记.动作标记和自定义标记.其中自定义标记主要讲述与Tag文件有关的Tag标记 1.指令标记page page 指令用来定义整个JSP页面的一些属性和这些属性的值,属性值用单 ...