QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#747759#9620. osu!maniaAmiyaCast#AC ✓0ms3892kbC++201.5kb2024-11-14 18:09:452024-11-14 18:09:46

Judging History

你现在查看的是最新测评结果

  • [2024-11-14 18:09:46]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3892kb
  • [2024-11-14 18:09:45]
  • 提交

answer

#include<bits/stdc++.h>
#define endl '\n'
#define ll long long
#define pii pair<ll, ll>
const ll inf = 2e18;
const double eps = 1e-10;
using namespace std;
void slv(){
    //MAX、300、200、100、50、MISS
    ll ppmax, a[7], b[7] = {0, 300, 300, 200, 100, 50, 0}, c[7] = {0, 320, 300, 200, 100, 50, 0};
    cin >> ppmax >> a[1] >> a[2] >> a[3] >> a[4] >> a[5] >> a[6];
    
    double Ace = (double)(a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] + a[5] * b[5] + a[6] * b[6]) 
        / (3.0 * (a[1] + a[2] + a[3] + a[4] + a[5] + a[6]));
    
    // ll tmp = Ace;
    // if(tmp % 10 >= 5) tmp += 10;
    // vector<int> v;
    // tmp /= 10;
    // while(tmp){
    //     v.push_back(tmp % 10);
    //     tmp /= 10;
    // }
    
    // while(v.size() <= 2) v.push_back(0);

    // for(int i = (int)v.size() - 1; i > 1; --i) {
    //     cout << v[i];
    // }
    // cout << '.';
    // cout << v[1] << v[0];
    // cout << "% ";

    cout << fixed << setprecision(2) << (Ace + eps) << "% ";
    double pp = max(0.0, (double) (a[1] * c[1] + a[2] * c[2] + a[3] * c[3] + a[4] * c[4] + a[5] * c[5] + a[6] * c[6]) 
        / (320.0 * (a[1] + a[2] + a[3] + a[4] + a[5] + a[6])) - 0.8) * 5.0 * ppmax;
    
    cout << fixed << setprecision(0) << (pp + eps) << endl;
}

int main(){
    ios::sync_with_stdio(0), cin.tie(0);
    int _ = 1;
    cin >> _;
    while(_--) slv();
    return 0;
}
/*
2
630
3029  2336 377 41 10 61
3000
20000 10000 0 0 0 0
*/

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3892kb

input:

18
1279
4624 4458 1109 220 103 314
753
3604 3204 391 33 9 29
807
5173 3986 763 84 29 96
718
576 461 60 5 2 7
947
4058 3268 764 169 42 158
568
2660 1731 161 16 6 15
641
4181 3126 656 56 10 43
630
3029 2336 377 41 10 61
529
1991 1354 181 11 9 5
1802
8321 2335 115 19 11 27
1645
3965 1087 41 6 1 13
1688...

output:

91.54% 543
97.40% 543
95.75% 523
97.12% 513
93.38% 499
98.16% 444
96.19% 430
96.20% 423
97.74% 400
99.19% 1604
99.38% 1482
99.14% 1465
98.53% 1251
100.00% 2688
100.00% 1792
100.00% 3000
52.78% 0
0.00% 0

result:

ok 18 lines