博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ZCMU训练赛-H(模拟)
阅读量:7008 次
发布时间:2019-06-28

本文共 2321 字,大约阅读时间需要 7 分钟。

H - Hard to Play

 

MightyHorse is playing a music game called osu!.

 

After playing for several months, MightyHorsediscovered the way of calculating score in osu!:

1. While playing osu!, player need to click some circles following the rhythm. Each time a player clicks, it will have three different points: 300, 100 and 50, deciding by how clicking timing fits the music.

2. Calculating the score is quite simple. Each time player clicks and gets P points, the total score will add P, which should be calculated according to following formula:

 

P = Point * (Combo * 2 + 1)

 

Here Point is the point the player gets (300, 100 or 50) and Combo is the number of consecutive circles the player gets points previously - That means if the player doesn't miss any circle and clicks the ith circle, Combo should be i - 1.

Recently MightyHorse meets a high-end osu!player. After watching his replay, MightyHorsefinds that the game is very hard to play. But he is more interested in another problem: What's the maximum and minimum total score a player can get if he only knows the number of 300, 100 and 50 points the player gets in one play?

As the high-end player plays so well, we can assume that he won't miss any circle while playing osu!; Thus he can get at least 50 point for a circle.

Input

There are multiple test cases.

The first line of input is an integer T (1 ≤ T≤ 100), indicating the number of test cases.

For each test case, there is only one line contains three integers: A (0 ≤ A ≤ 500) - the number of 300 point he gets, B (0 ≤ B ≤ 500) - the number of 100 point he gets and C (0 ≤ C ≤ 500) - the number of 50 point he gets.

Output

For each test case, output a line contains two integers, describing the minimum and maximum total score the player can get.

Sample Input

12 1 1

Sample Output

2050 3950
1 #include
2 #include
3 #include
4 int main() 5 { 6 int t; 7 int a,b,c; 8 int p1,p2,p3,p4,p5,p6; 9 int mins,maxs;10 while(scanf("%d",&t)!=EOF)11 {12 mins=0;13 maxs=0;14 while(t--)15 {16 /* mins=0;17 maxs=0;*/18 p1=p2=p3=p4=p5=p6=0;19 scanf("%d%d%d",&a,&b,&c);20 for(int i=0;i
View Code

 

转载于:https://www.cnblogs.com/Roni-i/p/7246753.html

你可能感兴趣的文章
Zend Studio 12 生成 WSDL
查看>>
JAVA学习心得
查看>>
【夯实Mysql基础】记一次mysql语句的优化过程
查看>>
VBPR: Visual Bayesian Personalized Ranking from Implicit Feedback-AAAI2016 -20160422
查看>>
servlet injection analysis
查看>>
(原)centos7安装和使用greenplum4.3.12(详细版)
查看>>
Hive之 hive与hadoop的联系
查看>>
java中的==、equals()、hashCode()源码分析
查看>>
HDU 3613 Best Reward 正反两次扩展KMP
查看>>
zepto.js 源码解析
查看>>
HTTP状态码大全
查看>>
使用ASP.NET Web API 2创建OData v4 终结点
查看>>
MyBatis简单的增删改查以及简单的分页查询实现
查看>>
Android快捷支付SDK Demo resultStatus={4001};memo={參数错误};result={}问题
查看>>
urllib2中自定义opener
查看>>
Hadoop快速入门
查看>>
MySql_安装及简单命令
查看>>
CSDN markdown 编辑器 第四篇 LaTex语法
查看>>
mongodb 初学 索引
查看>>
每日一小练——二项式系数加法解
查看>>