2014ACM集训13级PK赛3-Hard to Play
来源:互联网 发布:idc国际数据公司怎么样 编辑:程序博客网 时间:2024/06/06 03:48
Description
MightyHorse is playing a music game called osu!.
After playing for several months, MightyHorse discovered 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:
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, MightyHorse finds 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
有点像节奏大师,怪不得飞飞这么快就A了。
#include <stdio.h>#include <string.h>#include <stdlib.h>int main(){ int N; scanf ("%d",&N); while (N--) { int imax = 0,imin = 0; int a,b,c; int i; scanf ("%d%d%d",&a,&b,&c); int add = a + b + c; for (i = 0;i < add;i++) { if(i < c) imax += 50 * (i * 2 + 1); else if (i >= c && i < c + b) imax += 100 * (i * 2 + 1); else imax += 300 * (i * 2 + 1); if (i < a) imin += 300 * (i * 2 + 1); else if (i >= a && i < b + a) imin += 100 * (i * 2 + 1); else imin += 50 * (i * 2 + 1); } printf ("%d %d\n",imin,imax); } return 0;}
- 2014ACM集训13级PK赛3-Hard to Play
- 2014ACM集训13级PK赛3-Taxi Fare
- 2014ACM集训13级PK赛3-Modular Inverse
- 2014ACM集训13级PK赛3-Friends
- 2014ACM集训13级PK赛3-Java Beans
- 2014寒假ACM集训13级PK赛-翻转排序
- 2014寒假ACM集训13级PK赛-购买矿石
- 2014ACM集训13级PK赛2-Somali Pirates
- 2014ACM集训13级PK赛2-Wu Xing
- 2014ACM集训13级PK赛2-Ordinal Numbers
- 2014ACM集训13级PK赛2-Conic Section
- 2014ACM集训13级PK赛2-Kagome Kagome
- 2014ACM集训13级PK赛2-Javabeans
- 2014ACM集训13级PK赛2-Median
- 2014ACM集训13级PK赛4-K-Nice
- 2014ACM集训13级PK赛4-Light Bulb
- 2014ACM集训13级PK赛5-Easy Task
- 2014ACM集训13级PK赛3-Draw Something Cheat
- ant property 总结
- 【opencv】两条平行线之间的距离
- s2sh整合遇到的问题Error creating bean with name
- 二项分布和泊松定理
- 2011-8-6在上海的一篇日记
- 2014ACM集训13级PK赛3-Hard to Play
- 利用 Ant 和 Eclipse 有效地提高部署工作效率
- C++ char*,const char*,string的相互转换
- POJ 2488 A Knight's Journey
- absolute 绝对定位水平居中问题
- C++ 编程规范101读书笔记(3)编程风格
- ArcGIS Runtime SDK for iOS开发系列教程(5)——要素信息的绘制
- 将日期变为指定格式
- Nutch环境搭建