Submission #850392

# Submission time Handle Problem Language Result Execution time Memory
850392 2023-09-16T13:46:43 Z Ahmed57 Boarding Passes (BOI22_passes) C++17
0 / 100
0 ms 344 KB
#include <bits/stdc++.h>
using namespace std;
int main(){
    string s;cin>>s;
    long long x = s.size();
    if(x<=2)cout<<0<<endl;
    else if(x==3)cout<<0.5<<endl;
    long double v1 = x/2 , v2 = x-v1;
    long double ans = ((v1*(v1-1)/2)*(v1*(v1-1)/2))/(v1*(v1-1));
    swap(v1,v2);
    ans+= ((v1*(v1-1)/2)*(v1*(v1-1)/2))/(v1*(v1-1));
    cout<<setprecision(3)<<fixed<<ans<<endl;
    return 0;
}

# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB found '100800.5000000000', expected '100800.5000000000', error '0.0000000000'
2 Incorrect 0 ms 344 KB Extra information in the output file
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB found '100800.5000000000', expected '100800.5000000000', error '0.0000000000'
2 Incorrect 0 ms 344 KB Extra information in the output file
3 Halted 0 ms 0 KB -