# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1077615 | Arturgo | COVID tests (CEOI24_covid) | C++14 | 3409 ms | 8500 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
bool test_students(vector<bool> mask);
double esp(int prefix, int total);
int N;
double P;
bool estPasse[1001][1001];
double dp[1001][1001];
double powers[1001];
pair<double, int> opt_no_prefix(int total) {
double min_esp = INFINITY;
int opt_sz = -1;
for(int sz = 1;sz <= total;sz++) {
double P_vide = powers[sz];
double E = 1 + esp(0, total - sz) * P_vide + esp(sz, total) * (1 - P_vide);
if(E < min_esp) {
min_esp = E;
opt_sz = sz;
}
}
return {min_esp, opt_sz};
}
pair<double, int> opt_prefix(int prefix, int total) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |