Submission #938524

#TimeUsernameProblemLanguageResultExecution timeMemory
938524LucaIlieBoarding Passes (BOI22_passes)C++17
5 / 100
2 ms604 KiB
#include <bits/stdc++.h> using namespace std; double expectedInversions( int n ) { return (double)n * (n - 1) / 4; } int main() { int n; string s; cin >> s; n = s.size(); cout << fixed << setprecision( 3 ) << expectedInversions( n / 2 ) + expectedInversions( n - n / 2 ); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...