UVa 10300 Ecological Premium (water ver.)

复现基于PYNQ-Z2的手写数字识别卷积加速器设计 来源雪天鱼。 阅读详情

10300 - Ecological Premium

Time limit: 3.000 seconds

http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=1241

German farmers are given a premium depending on the conditions at their farmyard. Imagine the following simplified regulation: you know the size of each farmer's farmyard in square meters and the number of animals living at it. We won't make a difference between different animals, although this is far from reality. Moreover you have information about the degree the farmer uses environment-friendly equipment and practices, expressed in a single integer greater than zero. The amount of money a farmer receives can be calculated from these parameters as follows. First you need the space a single animal occupies at an average. This value (in square meters) is then multiplied by the parameter that stands for the farmer's environment-friendliness, resulting in the premium a farmer is paid per animal he owns. To compute the final premium of a farmer just multiply this premium per animal with the number of animals the farmer owns.

Input

The first line of input contains a single positive integer n (<20), the number of test cases. Each test case starts with a line containing a single integer f (0<f<20), the number of farmers in the test case. This line is followed by one line per farmer containing three positive integers each: the size of the farmyard in square meters, the number of animals he owns and the integer value that expresses the farmer’s environment-friendliness. Input is terminated by end of file. No integer in the input is greater than 100000 or less than 0.

 

Output

For each test case output one line containing a single integer that holds the summed burden for Germany's budget, which will always be a whole number. Do not output any blank lines.

 

Sample Input

3
5
1 1 1
2 2 2
3 3 3
2 3 4
8 9 2
3
9 1 8
6 12 1
8 1 1
3
10 30 40
9 8 5
100 1000 70

Sample Output

38

86

7445


学英语:

First you need the space a single animal occupies at an average. This value (in square meters) is then multiplied by the parameter that stands for the farmer's environment-friendliness, resulting in the premium a farmer is paid per animal he owns. To compute the final premium of a farmer just multiply this premium per animal with the number of animals the farmer owns.

首先你需要(计算出)每只动物所占的平均面积,用这一数值(单位:m^2)乘上农民的环境友好度,这一结果是这位农民需要付给他的每只动物的保险费(P)。要计算一位农民的最终的保险费,只需要将P乘上他所拥有的的动物数即可。


说了这么多,也就是面积x环境友好度。


完整代码:

/*0.009s*/

#include <cstdio>

int main(void)
{
	int Case, Test, sum, x, y, z;
	scanf("%d", &Case);
	while (Case--)
	{
		sum = 0;
		scanf("%d", &Test);
		while (Test--)
		{
			scanf("%d%d%d", &x, &y, &z);
			sum += x * z;
		}
		printf("%d\n", sum);
	}
	return 0;
}


YOLOv11+BiFPN双向特征金字塔:全方位解析多尺度检测性能优化指南 飞书链接:https://ecn6838atsup.feishu.cn/wiki/EhRtwBe1CiqlSEkHGUwc5AP9nQe?购买即可解锁800+YOLO优化文章,并且还有海量深度学习复现项目,价格仅需两杯奶茶的钱,每日更新。函数中添加BiFPN的解析逻辑(找到。链接可用,不要多复制空格了。密码:946m22&8。 阅读详情

相关推荐

一文读懂,WMS仓库管理系统模块功能

对于仓库管理人员来说,仓储管理是一件需要十分负责、又精细化的工作。

深蓝易网的博客 5216

UVa 414 Machined Surfaces (water ver.)

414 - Machined Surfaces Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=355 An imaging device furnishes di

AC,∑ndless 6714

MSPM0G3507+逐飞库:5分钟搞定KEIL环境配置与LED闪烁(附常见错误解决)

本文详细介绍了如何使用MSPM0G3507微控制器和逐飞库快速配置KEIL开发环境,并实现LED闪烁功能。从芯片支持包安装、逐飞库工程配置到烧录调试,提供了完整的步骤和常见错误解决方案,帮助开发者5分钟内完成环境搭建。

lambda的博客 1193

POJ 1835 宇航员 (模拟&三维向量旋转)

宇航员 http://poj.org/problem?id=1835 Time Limit: 2000MS Memory Limit: 30000K Description 问题描述:    宇航员在太空中迷失了方向,在他的起始位置现在建立一个虚拟xyz坐标系,称为绝对坐标系,宇航员正面的方向为x轴正方向,头顶方向为z轴正方向,则宇航员的初始状态如下

AC,∑ndless 3250

算法面经手撕系列(2)--手撕BatchNormlization

手动实现/手撕BatchNormlization

罟霖同学的站点 865

不用SE63逐个翻译!ABAP函数LXE_OBJ_TEXT_PAIR_WRITE批量处理TCODE描述的3种姿势

本文介绍了三种利用ABAP函数LXE_OBJ_TEXT_PAIR_WRITE批量翻译SAP事务码(TCODE)描述的高效方案,旨在替代SE63逐个翻译的低效操作。内容涵盖从基础循环、Excel导入到全自动程序集成的实现方法,帮助开发者显著提升批量翻译效率,并深入解析了SAP翻译体系的核心原理与实战技巧。

weixin_42593130的博客 659

UVa 118 Mutant Flatworld Explorers (模拟机器人移动)

118 - Mutant Flatworld Explorers Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=54 旋转时+1或+3再取模即可。 完整

AC,∑ndless 2570

海思SD3403/SS928开发(二)环境搭建:从零到一构建高效开发环境的实战指南

本文详细介绍了海思SD3403/SS928开发板环境搭建的全流程,包括Ubuntu系统选择、基础配置、开发环境依赖安装、SDK工具链配置等关键步骤。通过实战经验分享,帮助开发者避免常见问题,快速构建高效开发环境,提升开发效率。

weixin_28717683的博客 284

Codeforces Beta Round #74 (Div. 2) / 90B African Crossword (模拟)

B. African Crossword http://codeforces.com/problemset/problem/90%2FB time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard o

AC,∑ndless 2416

Ubuntu20.04配置PX4环境启动或编译jmavsim 出现的错误及解决办法

错误1:ant命令未找到

Iamsonice的博客 8855

Vision 机器视觉案例 之 零件边缘缺陷检测

缺陷检测工具

机器视觉李小白的博客 1384

Codeforces Round #173 (Div. 2) / 282A Bit++(模拟)

A. Bit++ http://codeforces.com/problemset/problem/282/A time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output

AC,∑ndless 2227

【DaVinci Developer专题】-41-APP SWC如何读取写入NVM Block数据

APP SWC Port如何Read读取/Write写入NVM Block数据; DaVinci Developer中的Calibration Parameter/Per-Instance Memory/Service Need如何配置。

「汽车电子助手」的博客 4468

UVa 10114 Loansome Car Buyer (模拟)

10114 - Loansome Car Buyer Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1055 Kara Van and Lee Sabre are l

AC,∑ndless 2074

ssm框架搭建

这个是一个在idea上成功跑起来的ssm框架项目,保存在这里方便以后使用直接下载

STM32F407中文手册

STM32f407中文手册 本参考手册面向应用开发人员,提供有关使用 STM32F405xx/07xx、STM32F415xx/17xx、 STM32F42xxx 和 STM32F43xxx 微控制器存储器与外设的完整信息。STM32F405xx/07xx、STM32F415xx/17xx、STM32F42xxx 和 STM32F43xxx 构成一个微 控制器系列,各产品具有不同的存储器大小、封装和外设。有关订购信息以及器件的机械与电气特性,请参见数据手册。有关 ARM Cortex™-M4F 内核的信息,请参见《Cortex™-M4F 技术参考手册》。

Codeforces Beta Round #98 (Div. 2) / 137A Postcards and photos (模拟)

A. Postcards and photos http://codeforces.com/problemset/problem/137/A time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard

AC,∑ndless 2022

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

UVa 10189 Minesweeper (模拟)

10189 - Minesweeper Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1130 The Problem Have you ever played

AC,∑ndless 1848

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

Codeforces Round #186 (Div. 2) / 313B Ilya and Queries (字符串处理)

B. Ilya and Queries time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Ilya the Lion wants to help all his fri

AC,∑ndless 1810

【优化&大师级代码欣赏】Codeforces Round #137 (Div. 2) / 222B Cosmic Tables (矩阵)

B. Cosmic Tables http://codeforces.com/problemset/problem/222/B time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output

AC,∑ndless 1782

POJ 1028 / East Central North America 2001 Web Navigation (栈)

Web Navigation http://poj.org/problem?id=1028 Time Limit: 1000MS Memory Limit: 10000K Description Standard web browsers contain features to move backward and forward among the p

AC,∑ndless 1666

UVa 442/HDU 1082/ZOJ 1094 Matrix Chain Multiplication(模拟&栈)

442 - Matrix Chain Multiplication Time limit: 3.000 seconds Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative,

AC,∑ndless 1638

POJ 2260 Error Correction (模拟)

Error Correction http://poj.org/problem?id=2260 Time Limit: 1000MS Memory Limit: 65536K Description A boolean matrix has the parity property when each row and each column has an

AC,∑ndless 1603

UVa 591 Box of Bricks (模拟)

591 - Box of Bricks Time limit: 3.000 seconds http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=467&page=show_problem&problem=532 Little Bob likes playing with his b

AC,∑ndless 1593

UVa 10700 Camel trading (计算表达式)

10700 - Camel trading Time limit: 3.000 seconds  http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=113&page=show_problem&problem=1641 Background Aroud 800 A.D., El

AC,∑ndless 1577

深挖C++:类和对象(中)

(先进后出)

xys_678的博客 182

选型笔记:Type‑C 扩展坞方案评估|DP1.4 转 HDMI2.0 桥接芯片 GSV2201S@ACP

本文记录 GSV2201S 这款 DP1.4a 转 HDMI2.0 桥接芯片评估,梳理视频、HDCP、PD 集成能力,总结 Type‑C 转接 Dongle、扩展坞方案的适配边界,以及差分走线、PD 时序、HDCP 握手等高频调试问题,为 C 口视频转接方案选型提供参考。

ACP广源盛的博客 217

C++移动构造函数详解

移动构造函数是C++11引入的一种特殊构造函数,用于从临时对象(右值)"窃取"资源来初始化新对象,而不是进行昂贵的深拷贝。char* data;public:// 移动构造函数:参数是右值引用 &&// 关键:把源对象的资源置空。

拒绝AI文,努力在AI时代写出感动人心的好文章 385
上一篇: UVa 10071 Back to High School Physics (water ver.)
下一篇: UVa 458 The Decoder (最简代码!)
synapse7
博客等级 码龄14年 432粉丝 701原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值