# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1077598 | Arturgo | COVID tests (CEOI24_covid) | C++14 | 3197 ms | 8524 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;
int N;
double P;
bool test_students(vector<bool> mask);
bool estPasse[1001][1001];
double dp[1001][1001];
double powers[1001];
double esp(int prefix, int total) {
if(estPasse[prefix][total]) return dp[prefix][total];
estPasse[prefix][total] = true;
if(total == 0) return dp[prefix][total] = 0;
if(prefix == 0) {
double min_esp = INFINITY;
for(int sz = 1;sz <= total;sz++) {
double P_vide = powers[sz];
min_esp = min(min_esp,
1
+ esp(0, total - sz) * P_vide
+ esp(sz, total) * (1 - P_vide)
);
}
return dp[prefix][total] = min_esp;
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... |