| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1179621 | tamyte | Boarding Passes (BOI22_passes) | C++20 | 0 ms | 580 KiB |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
// random_device rd;
// mt19937 rng(rd());
ios::sync_with_stdio(false);
cin.tie(nullptr);
string s;
cin >> s;
int n = s.size();
double res = 100000000;
for (int i = 1; i <= n; ++i) {
double k1 = i;
double k2 = n - i;
double now = k1 * (k1 - 1) + k2 * (k2 - 1);
now /= 4.0;
res = min(res, now);
}
cout << fixed << setprecision(10) << res << endl;
}| # | 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... | ||||
