QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#736891#9620. osu!maniahezlik#AC ✓0ms3788kbC++202.4kb2024-11-12 13:50:562024-11-12 13:50:57

Judging History

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

  • [2024-11-12 13:50:57]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3788kb
  • [2024-11-12 13:50:56]
  • 提交

answer


#if defined(local)
#include "./noya/debug.hpp"
#else
#define debug(...) 42
#endif

#include "bits/stdc++.h"

using namespace std;
#define rep1(a) for (int i = 0; i < a; i++)
#define rep2(i, a) for (int i = 0; i < a; i++)
#define rep3(i, a, b) for (int i = a; i < b; i++)
#define rep4(i, a, b, c) for (int i = a; i < b; i += c)
#define overload4(a, b, c, d, e, ...) e
#define rep(...) overload4(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define pb emplace_back
template <typename T, typename T2> void cmin(T &x, const T2 &y) {
  x = x < y ? x : y;
}
template <typename T, typename T2> void cmax(T &x, const T2 &y) {
  x = x > y ? x : y;
}


#include <cstdint>
using ll = int64_t;
using ull = uint64_t;
namespace noya {
template <class T> constexpr T infty = 0;
template <> constexpr int infty<int> = 1010000000;
template <> constexpr ll infty<ll> = 2020000000000000000;
template <> constexpr unsigned infty<unsigned> = infty<int>;
template <>
constexpr ull infty<ull> = infty<ll>;
template <>
constexpr __int128 infty<__int128> =
    __int128(infty<ll>) * 2000000000000000000;
template <> constexpr double infty<double> = infty<ll>;
template <> constexpr long double infty<long double> = infty<ll>;
} // namespace noya


using vi = vector<int>;
using vl = vector<ll>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template <class T> using vc = vector<T>;
const int INF = 1010000000;
const ll LNF = 1010000000000000000;
#define sz(x) int((x).size())
#define all(x) begin(x), end(x)
#define fi first
#define se second

namespace noya {}


void solve() {
  int ppmax;
  cin >> ppmax;
  int a, b, c, d, e, f;
  cin >> a >> b >> c >> d >> e >> f;
  using ld = long double;
  const ld eps = 1e-9;
  
  ld acc = ld(1) *
           (300. * a + 300. * b + 200. * c + 100. * d + 50. * e + 0 * f) /
           (ld(300) * (a + b + c + d + e + f));

  ld pp = max(ld(0), ld(1) *
                             (320. * a + 300. * b + 200. * c + 100. * d +
                              50. * e + 0 * f) /
                             (ld(320) * (a + b + c + d + e + f)) -
                         ld(0.8)) *
          5. * ppmax;

  cout << acc * 100. << "% ";

  cout << int(pp + 0.5 + eps) << "\n";
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);

  cout << fixed << setprecision(2);
  int T;
  cin >> T;
  while (T--)
    solve();
}

详细

Test #1:

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

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