QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#754031 | #9620. osu!mania | Bigmonster# | AC ✓ | 0ms | 3648kb | C++20 | 2.2kb | 2024-11-16 14:05:23 | 2024-11-16 14:05:25 |
Judging History
answer
// created on Lucian Xu's Laptop
#include <bits/stdc++.h>
// using namespace std;
#define typet typename T
#define typeu typename U
#define types typename... Ts
#define tempt template <typet>
#define tempu template <typeu>
#define temps template <types>
#define tandu template <typet, typeu>
using UI = unsigned int;
using ULL = unsigned long long;
using LL = long long;
using ULL = unsigned long long;
using i128 = __int128;
using PII = std::pair<int, int>;
using PIL = std::pair<int, LL>;
using PLI = std::pair<LL, int>;
using PLL = std::pair<LL, LL>;
using vi = std::vector<int>;
using vvi = std::vector<vi>;
using vl = std::vector<LL>;
using vvl = std::vector<vl>;
using vpi = std::vector<PII>;
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) \
do { \
} while (false)
#endif
constexpr int mod = 998244353;
constexpr int inv2 = (mod + 1) / 2;
constexpr int inf = 0x3f3f3f3f;
constexpr LL INF = 1e18;
constexpr double pi = 3.141592653589793;
constexpr double eps = 1e-6;
constexpr int lowbit(int x) { return x & -x; }
tandu bool Max(T& x, const U& y) { return x < y ? x = y, true : false; }
tandu bool Min(T& x, const U& y) { return x > y ? x = y, true : false; }
void solut() {
int ppmax, a, b, c, d, e, f;
std::cin >> ppmax >> a >> b >> c >> d >> e >> f;
auto func = [&](LL p, LL q) { return (p * 2 + q) / (q * 2); };
int acc = func(
(1ll * 300 * a + 300 * b + 200 * c + 100 * d + 50 * e) * 100,
1ll * 3 * (a + b + c + d + e + f));
int pp = func(
std::max(
0ll, (1ll * 320 * a + 300 * b + 200 * c + 100 * d + 50 * e -
1ll * 8 * 32 * (a + b + c + d + e + f)) *
ppmax),
1ll * 64 * (a + b + c + d + e + f));
std::cout << acc / 100 << '.' << (acc % 100) / 10 << acc % 10 << '%' << ' ' << pp << '\n';
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
std::cout.tie(0);
int t = 1;
std::cin >> t;
while (t--) {
solut();
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3648kb
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