UVa 10300 - Ecological Premium
思路:求premium值,就是面积*环境友好度;其中动物个数和每个动物所占size为多余信息。
#include<iostream>
using namespace std; int main()
{
int a,b,c;
int sum;
int t,m;
cin>>t;
while(t--)
{
cin>>m;
sum=;
while(m--)
{
cin>>a>>b>>c;
sum+=a*c;
}
cout<<sum<<endl;
}
return ;
}
UVa 10300 - Ecological Premium的更多相关文章
- 10300 - Ecological Premium
Problem A Ecological Premium Input: standard input Output: standard output Time Limit: 1 second Memo ...
- Ecological Premium - UVa10300
欢迎访问我的新博客:http://www.milkcu.com/blog/ 原文地址:http://www.milkcu.com/blog/archives/uva10300.html 题目描述 Pr ...
- UVa 102 - Ecological Bin Packing(规律,统计)
题目来源:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=3&pa ...
- Ecological Premium
#include<bits/stdc++.h> using namespace std; int main() { int n,m; unsigned long long int a,b, ...
- UVa - 102 - Ecological Bin Packing
Background Bin packing, or the placement of objects of certain weights into different bins subject t ...
- UVA_10300:Ecological Premium
Sample Input 351 1 12 2 23 3 32 3 48 9 239 1 86 12 18 1 1310 30 409 8 5100 1000 70Sample Output 3886 ...
- 【索引】Volume 0. Getting Started
AOAPC I: Beginning Algorithm Contests (Rujia Liu) Volume 0. Getting Started 10055 - Hashmat the Brav ...
- UVA题目分类
题目 Volume 0. Getting Started 开始10055 - Hashmat the Brave Warrior 10071 - Back to High School Physics ...
- UVa OJ 10300
Problem A Ecological Premium Input: standard input Output: standard output Time Limit: 1 second Memo ...
随机推荐
- 解决ubuntu下安装phpmyadmin访问不了的问题
在/etc/apache2/sites-available下有个文件 000-default.conf 文件为只读,需要sudo 命令修改, 把DocumentRoot /var/www/html ...
- python数据结构与算法——冒泡排序
用两种方式实现,非递归和递归 直接上代码: 先是失败的递归方式,涉及到对象引用的问题: # Bad 想一想为啥不行? def bubblesort_rec_bad(A): if len(A)==1: ...
- Anchor 对象和document对象
<script type="text/javascript"> function chanklink(){ document.getElementById(" ...
- cocoapod的下载安装解释
本文不提供cocoapod的下载安装的流程,因为那些只要百度一下就有的东西,而是对里面的代码进行解释,希望对iOS小白安装cocoapod有帮助: 一.cocoapod是什么? 开发过程中,我们会用到 ...
- linux C 获取当前目录的实现(转-Blossom)
linux C 获取当前目录的实现: //获取当前目录#include <stdlib.h>#include <stdio.h>#include <string.h> ...
- 使用curl获取Location:重定向后url
在php获取http头部信息上,php有个自带的函数get_headers(),我以前也是用这个的,听说效率在win上不咋地,再加上最近研究百度url无果,写了cURL获取重定向url的php代码来折 ...
- [NOIP2009] 靶形数独(搜索+剪枝)
题目描述 小城和小华都是热爱数学的好学生,最近,他们不约而同地迷上了数独游戏,好胜的他 们想用数独来一比高低.但普通的数独对他们来说都过于简单了,于是他们向 Z 博士请教, Z 博士拿出了他最近发明的 ...
- ATMEL处理器自带USB CDC的Win7驱动问题
[背景] 很久以前使用ATMEL的处理器开发了一款设备,通过处理器本身的功能,借助USB在PC端虚拟一个串口出来,实现和上位机软件的通信,和基本的参数设置和数据读取功能. 这个功能就是ATMEL官网上 ...
- flash cs6导入某些mp3不能的解决办法
安装最新的quicktime 另外还有一个很恶心的办法,可以不用装quicktime. 1.用adobe audio打开一个没问题的mp3, 2.再打开有问题的MP3,全选,复制: 3.切换到没问题的 ...
- 【转】关于Block Formatting Context--BFC和IE的hasLayout
转自穆乙 http://www.cnblogs.com/pigtail/ 一.BFC是什么? BFC(Block Formatting Context)直译为“块级格式化范围”. 是 W3C CSS ...