题目描述
dXqwq likes playing maimai DX UNiVERSE PLUS, since he can't fly to Japan and SEGA completely ignores the feelings of Chinese players, he can only play maimai DX 2077.
In maimai DX 2077, you need to press the button or touch the screen when NOTE appears. There are 4 types of NOTE: TAP, HOLD, SLIDE, and BREAK. There are also 5 judgments for each NOTE: CRITICAL PERFECT, PERFECT, GREAT, GOOD, and MISS.
For each type of NOTE, you can get some standard points according to the judgment. For BREAK NOTEs, you can get some extra points according to the judgment.
Here is the table of standard points:
Here is the table of extra points:
示例1
输入
311 131 24 1 2 48 20 4 0 0 36 0 0 1 0 35 15 1 0 0
输出
99.523505378
示例2
输入
224 133 15 0 0 45 14 0 0 0 57 0 2 1 0 15 16 0 0 0
输出
100.051026393
示例3
输入
324 210 26 2 2 13 14 1 0 0 102 0 3 3 0 9 4 0 0 0
输出
99.369444233
签到题,不多bb
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;
const int mod = 998244353;
const int N = 5e5 + 10;
int t[5][6];
double c1[7]={0,1.0,1.0,0.8,0.5,0};
double c2[7]={0,2.0,2.0,1.6,1.0,0};
double c3[7]={0,3.0,3.0,2.4,1.5,0};
double c4[7]={0,5.0,5.0,2.5,2.0,0};
double c5[7]={0,1.0,0.5,0.4,0.3,0};
int main() {
double a0=0,a=0,b0=0,b=0;
for(int i=1;i<=4;i++){
for(int q=1;q<=5;q++){
cin>>t[i][q];
}
}
for(int i=1;i<=5;i++){
a0+=t[1][i]*c1[i];//计算自己的原始分
a+=c1[1]*t[1][i];//计算最好情况
}
for(int i=1;i<=5;i++){
a0+=t[2][i]*c2[i];
a+=c2[1]*t[2][i];
}
for(int i=1;i<=5;i++){
a0+=t[3][i]*c3[i];
a+=c3[1]*t[3][i];
}
for(int i=1;i<=5;i++){
a0+=t[4][i]*c4[i];
a+=c4[1]*t[4][i];
}
for(int i=1;i<=5;i++){
b0+=t[4][i]*c5[i];
b+=t[4][i]*c5[1];
}
printf("%.09lf",a0/a*100+b0/b);
return 0;
}
链接:登录—专业IT笔试面试备考平台_牛客网
来源:牛客网