QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#750165#9620. osu!maniaucup-team1329#AC ✓0ms3804kbC++172.5kb2024-11-15 13:09:402024-11-15 13:09:40

Judging History

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

  • [2024-11-15 13:09:40]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3804kb
  • [2024-11-15 13:09:40]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

#define all(x) x.begin(), x.end()
#define all1(x) x.begin() + 1, x.end()
#define bit1(x) __builtin_popcountll(x)
#define Pqueue priority_queue
#define lc p << 1
#define rc p << 1 | 1
#define IOS ios::sync_with_stdio(false), cin.tie(0);
#define fi first
#define se second
#define lowbit(x) (x & -x)

typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<ll, ll> PII;

const ll mod = 1000000007;
const ll N = 1e6 + 10;
const ld eps = 1e-9;
const ll inf = 1e18;
const ll P = 131;
const ll dir[8][2] = {1, 0, 0, 1, -1, 0, 0, -1, 1, 1, 1, -1, -1, 1, -1, -1};

void solve()
{
    int ppmx, a[6];
    cin >> ppmx;
    for (auto &i : a)
        cin >> i;
    vector<int> p({300, 300, 200, 100, 50, 0});
    double acc = 0, sum = 0;
    for (int i = 0; i < 6; i++)
    {
        acc += p[i] * a[i] * 1.0;
        sum += a[i];
    }
    acc = acc * 1.0 / (300 * sum * 1.0) * 100;

    p[0] = 320;
    double pp = 0;
    for (int i = 0; i < 6; i++)
    {
        pp += p[i] * a[i] * 1.0;
    }
    // cout << pp << " " << sum << "\n";
    pp = max(0.0, pp * 1.0 * 5 * ppmx / (320 * sum * 1.0) - 0.8 * 5 * ppmx) ;

    cout << fixed << setprecision(2) << acc << "% ";
    // printf("%.2lf%% %.0lf\n",acc,pp);
    cout << fixed << setprecision(0) << pp << "\n";
}

int main()
{
    IOS int T = 1;
    cin >> T;
    while (T--)
        solve();
    return 0;
}

/*
oxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxox
x                                                                                      o
o       _/_/_/_/                                                              _/       x
x      _/                                                                              o
o     _/_/_/_/ _/  _/_/   _/_/   _/_/_/ _/_/   _/_/_/     _/_/    _/_/_/    _/ _/   _/ x
x    _/       _/_/     _/    _/ _/   _/   _/  _/    _/ _/    _/  _/    _/  _/   _/ _/  o
o   _/       _/       _/    _/ _/   _/   _/  _/    _/ _/    _/  _/    _/  _/    _/_/   x
x  _/       _/         _/_/   _/   _/   _/  _/_/_/     _/_/ _/ _/    _/  _/      _/    o
o                                          _/                           _/      _/     x
x                                         _/                        _/_/       _/      o
o                                                                                      x
xoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxoxo
*/

詳細信息

Test #1:

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

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