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;
#define FOR(i, a, b) for(int i=a; i<=b; ++i)
#define ll long long
#define ld long double
int main() {
cin.tie(0) -> ios_base::sync_with_stdio(0);
string s;
cin >> s;
int n = s.size();
int l = n/2;
int r = n/2+n%2;
ll sum = l*(l-1) + r*(r-1);
ld w = (ld)(sum)/4;
cout << fixed << setprecision(15) << w << '\n';
}
# | 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... |