# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1034612 | anango | Genetics (BOI18_genetics) | C++17 | 40 ms | 5364 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>
#define int long long
using namespace std;
mt19937 rng;
int INF = 1LL<<30;
int n,m,k;
int match(string &s1, string &s2) {
int ct=0;
int b = 0;
long double prob = 1;
for (int i=0; i<m; i++) {
bool bol = s1[i]!=s2[i];
//ct and b, k and n
if (bol) {
prob*=k;
prob/=n;
prob*=b+1;
prob/=ct+1;
}
else {
prob*=(n-k);
prob/=n;
prob*=b+1;
prob/=b-ct+1;
}
//cout << ct << " " << b <<" " << k <<" " <<n <<" " << prob << endl;
if (prob<1e-7) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |