ZOJ 3712Hard to Play(水题)
来源:互联网 发布:苹果cms 火车头接口 编辑:程序博客网 时间:2024/05/21 10:14
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
想法:水题
代码:#include<stdio.h>#include<string.h>int main(){ int T; scanf("%d",&T); while(T--) { int a,b,c; scanf("%d %d %d",&a,&b,&c); int i,j; long long sum1=0; for(i=1;i<=a+b+c;i++) { if(i<=a) { sum1+=(2*(i-1)+1)*300; } else { if(i<=a+b) { sum1+=(2*(i-1)+1)*100; } else { sum1+=(2*(i-1)+1)*50; } } } long long sum=0; for(i=1;i<=a+b+c;i++) { if(i<=c) { sum+=(2*(i-1)+1)*50; } else { if(i<=c+b) { sum+=(2*(i-1)+1)*100; } else { sum+=(2*(i-1)+1)*300; } } } printf("%lld %lld\n",sum1,sum); } return 0;}
- ZOJ 3712Hard to Play(水题)
- zoj 3712 Hard to Play(数学题)
- zoj 3712 Hard to Play
- ZOJ 3712 Hard to Play
- ZOJ 3712 Hard to Play
- ZOJ 3712 Hard to Play
- ZOJ 3712 Hard to Play
- ZOJ 3712 Hard to Play
- ZOJ 3712 Hard to Play
- zoj 3712 Hard to Play
- ZOJ-3712-Hard to Play
- Hard to Play ZOJ 3712
- ZOJ-Hard to Play
- ZOJ 3712 Hard to Play(贪心题)
- ZOJ 3712Hard to Play(模拟)
- ZOJ-3712-Hard to Play【10th浙江省赛】
- zju 3712 Hard to Play
- ZOJ3712:Hard to Play
- BZOJ3514(LCT+可持久化线段树)
- Android Studio 3.0 Canary 8无法安装apk到小米手机
- itemgetter对列表排序
- 【LeetCode】Remove Linked List Elements 解题报告
- 计算器的改良
- ZOJ 3712Hard to Play(水题)
- 提取面狭长角
- hihocoder 1323 回文字符串
- UOJ 赴京赶考
- git 学习 (一)
- 兼容性问题总结
- 第一类,第二类Stirling数,Bell数模板 来自(http://blog.csdn.net/sr_19930829/article/details/40888349)
- bower的安装、Bootstrap的安装及简单使用
- bzoj4237稻草人 cdq分治+栈