1 条题解

  • 1
    @ 2023-8-15 16:51:57

    按照题目模拟即可,先算出每首歌的ACC值在算出每首歌的rsk值,取前19首歌的rsk值相加(b19),少与19首歌按0计算。最后再加上最高收歌定数,除以20就是答案。

    最高收歌定数:在ACC为100%的歌中选取谱面定数最大的数,在题目中并未解释此概念,存在题意模糊的情况,建议出题人修改题面

    #include <bits/stdc++.h>
    #define xx first
    #define yy second
    #define debug(x) cout << #x << "=" << x << '\n';
    const int INF = 0x3f3f3f3f;
    const int N = 1e6 + 10;
    #define IOS                    \
      ios::sync_with_stdio(false); \
      cin.tie(0);                  \
      cout.tie(0);
    using namespace std;
    typedef long long ll;
    typedef unsigned long long ull;
    typedef pair<int, int> PII;
    int xx[] = {0, 0, 1, -1};
    int yy[] = {1, -1, 0, 0};
    int gcd(int a, int b) {
      return b ? gcd(b, a % b) : a;  //求最大公约数
    }
    ll yinshu(ll x) {  //快速求一个数的因数个数
      ll ans = 0;
      for (ll i = 2; i <= sqrt(x); i++) {
        if (x % i == 0) ans += 2;
        if (i * i == x) ans--;
      }
      return ans;
    }
    int a, g, b, m;
    double c[N];
    double maxx;
    double ans;
    struct date {
      double x;
      double q;
    } cnt[N];
    int cmp(date r, date s) { return r.x > s.x; }
    void solve() {
      ans = 0;
      maxx = 0;
      int n;
      cin >> n;
      for (int i = 1; i <= n; i++) {
        cin >> a >> g >> b >> m >> c[i];
        int k = a + g + b + m;
        double j = a + g * 0.65;
        double l = k;
        double x = j / (l * 1.0);  //单曲ACC值
        if (x < 0.7) {
          cnt[i].x = 0;
        } else {
          double d = pow((double)(100 * x - 55) / (1.0 * 45), 2);  //单曲rsk值
          if (d == 1) maxx = max(maxx, c[i]);
          cnt[i].x = d * c[i];
        }
      }
      int mm;
      if (n >= 19) {
        mm = 19;
      } else {
        mm = n;
      }
      sort(cnt + 1, cnt + n + 1, cmp);
      for (int i = 1; i <= mm; i++) {
        ans += cnt[i].x;
      }
      ans += maxx;
      ans = ans / (20 * 1.0);
      printf("%.2lf\n", ans);
    }
    int main() {
      int t;
      cin >> t;
      while (t--) {
        solve();
      }
    }
    
    • 1

    信息

    ID
    828
    时间
    1000ms
    内存
    256MiB
    难度
    9
    标签
    递交数
    240
    已通过
    15
    上传者