CSU 1032 OSU! Scoring System

135 篇文章 0 订阅
50 篇文章 0 订阅

OSU! is a rhythm game based on the gameplay of a variety of popular commercial rhythm games. The gameplay consists of only three elements: hit circles on the screen, dragging a ball across a fixed path and rotating a spinner very fast. To simplify the calculation, we assume that there are only hit circles in this game.

 

Here’s the scoring system of this game:

Hit circle judgment

You get a 300, 100 or 50 from a normal hit circle depending on how accurately you click on it. If you do not click on the hit circle at all or click on it way too early you will receive a miss.

 

Combo

The initial of your combo is 0, and each successful hitting (300,100 or 50) add 1 point to your combo. A miss will reset your combo to 0.

 

Score

The score given by each hit circle is calculated with the following formula:

Score = HitValue + HitValue * (Combo multiplier * Difficulty multiplier * Mod multiplier) / 25

Hit value = The hit circle judgment (50, 100 or 300).

Combo multiplier = The max value between (Combo before this hit - 1) and 0.

Difficulty multiplier = The difficulty setting for the beatmap.

Mod multiplier = The multiplier of the selected mods.

The total score is the sum of score given by each hit circle.

 

Accuracy

Accuracy = Total points of hits / (Total number of hits * 300) *100%

Total number of hits = (Number of misses + Number of 50's + Number of 100's + Number of 300's)

Total points of hits = (Number of 50s * 50 + Number of 100s * 100 + Number of 300s * 300)

In other words, each miss counts as 0 points, each 50 counts as 50 points, each 100 as 100 points and each 300 as 300 points. Add them all together and divide the sum with the number of hits multiplied by 300. If you score only 300s you will get a result of 1.00 which means 100% accuracy. If you score only 100s you will get a result of 0.3333 which means 33.33% accuracy.

 

Grades

After each play, you will get your grade according to your performance.

SS = 100% accuracy

S = Over 90% 300s, less than 1% 50s and no misses.

A = Over 80% 300s and no misses OR over 90% 300s.

B = Over 70% 300s and no misses OR over 80% 300s.

C = Over 60% 300s.
D = Anything else.

Input

The first line contains a non-negative integer N, the number of test cases, at most 100.

The first line of each test case contains three numbers, D, M and L (1 ≤ D ≤ 5, 1 ≤ M ≤ 1.5, 1 ≤ L ≤ 1000). D means Difficulty multiplier, M means Mod multiplier and L means the number of hit circles.

The second line of each test case contains L integers (0, 50, 100 or 300), which denote your performance of each hit circle. 0 means a miss.

Output

For each case, out put the total score, accuracy and grade on a line. (Accurate to two digits after decimal point.).

Sample Input

21 1.1 5300 300 300 300 300
2 1.0 6300 0 100 300 300 300 

Sample Output

1579.20 100.00% SS
1372.00 72.22% C 

 

一道模拟题

 

#include <stdio.h>

int main()
{
    int cas,com,mis,num50,num300;
    scanf("%d",&cas);
    double d,m,l,hsum,sum,all,num;
    while(cas--)
    {
        scanf("%lf %lf %lf",&d,&m,&l);
        hsum=0,sum=0,all=0;
        com=mis=num50=num300=0;
        for(int i=0;i<l;i++)
        {
            scanf("%lf",&num);
            all+=num+num*( (com-1>0?com-1:0)*d*m )/25;
            if(num==0) com=0,mis++;
            else com++;
            hsum+=num;
            if(num==50) num50++;
            if(num==300) num300++;
        }
        printf("%.2lf %.2lf%% ",all,hsum*100/(l*300));
        double temp=hsum*100/(l*300);
        if(temp==100) printf("SS\n");
        else
        {
            double temp50=num50*50*100/(l*300);
            double temp300=num300*300*100/(l*300);
            if(temp300>=90 &&temp50<=1 &&mis==0)
                printf("S\n");
            else if(temp300>=80 &&mis==0 || temp300>=90)
                printf("A\n");
            else if(temp300>=70&&mis==0 ||temp300>=80)
                printf("B\n");
            else if(temp300>=60)
                printf("C\n");
            else printf("D\n");
        }
    }
    return 0;
}

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值