Submission #829415

#TimeUsernameProblemLanguageResultExecution timeMemory
829415QwertyPiBoarding Passes (BOI22_passes)C++14
5 / 100
2 ms596 KiB
#include <bits/stdc++.h> #pragma GCC optimize("unroll-loops") #pragma GCC optimize("Ofast") #define int long long using namespace std; int f(int x){ return x * (x - 1) / 2; } int32_t main(){ string s; cin >> s; int n = s.size(); int ans = f(n / 2) + f((n + 1) / 2); cout << setprecision(10) << fixed << ((long double) ans / 2) << endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...