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 ...
随机推荐
- jQuey中的return false作用是什么?
jQuey中的return false作用是什么?在众多的语句中都有return false的使用,当然对于熟悉它的开发者来说,当然是知根知底,知道此语句的作用,当然也就知道在什么时候使用此语句,不过 ...
- UVA - 12113 Overlapping Squares(dfs+回溯)
题目: 给定一个4*4的棋盘和棋盘上所呈现出来的纸张边缘,问用不超过6张2*2的纸能否摆出这样的形状. 思路: dfs纸的张数,每一张中枚举这张纸左上角这个点的位置,暴力解题就可以了. 这个题的覆盖太 ...
- 数据结构---二叉搜索树BST实现
1. 二叉查找树 二叉查找树(Binary Search Tree),也称为二叉搜索树.有序二叉树(ordered binary tree)或排序二叉树(sorted binary tree),是指一 ...
- 使用 resultMap 实现高级结果集映射
resultMap 的基本配置项 属性 id 属性:resultMap 的唯一标识,此 id 值用于 select 元素 resultMap 属性的引用. type 属性:表示该 resultMap ...
- Python关于导入模块的一些感想:
写项目的时候,碰到这种情况 程序业务为core,里面有两个目录,core1 和core2 core1中有三个模块,business main main1 程序入口为bin目录下的project ...
- buf.readUInt16BE()
buf.readUInt16BE(offset[, noAssert]) buf.readUInt16LE(offset[, noAssert]) offset {Number} 0 <= of ...
- CCF201604-1 折点计数 java(100分)
试题编号: 201604-1 试题名称: 折点计数 时间限制: 1.0s 内存限制: 256.0MB 问题描述: 问题描述 给定n个整数表示一个商店连续n天的销售量.如果某天之前销售量在增长,而后一天 ...
- 充当别的mcu的外部存储器(51类)
// 锁存地址 - STC12C5A60S2 reg [15:0]rAddr_51; //存放51单片机传过来的地址 读51地址寄存器 always @ (posedge MCLKout or neg ...
- 【Codeforces 159B】Matchmaker
[链接] 我是链接,点我呀:) [题意] 笔和笔盖 笔有颜色和直径 笔盖也有颜色和直径 笔盖和笔如果直径相等 那么称为good 如果笔盖和笔直径相等.颜色也相等,那么称为very good 问你怎样安 ...
- noip模拟赛 whzzt-Conscience
分析:数据中并不存在无解的情况...... 每个摄像头都要覆盖尽可能多的点,按照y从小到大排序.对于每一列,只用判断第一个没有被观测到的就可以了,这个点必须要放摄像头,因为除了它自己没有其它的摄像头能 ...