Submission #823760

# Submission time Handle Problem Language Result Execution time Memory
823760 2023-08-13T06:05:52 Z ttamx Boarding Passes (BOI22_passes) C++14
0 / 100
1 ms 340 KB
#include<bits/stdc++.h>

using namespace std;

typedef long double ld;

const int G=20;
const int N=15;

int n,g;
ld dp[N];

int main(){
    cin.tie(nullptr)->sync_with_stdio(false);
    string s;
    cin >> s;
    n=s.size();
    for(int i=1;i<=n;i++){
        dp[i]=dp[i-1];
        dp[i]+=1.l*(1ll*(i/2)*(i/2-1))/i;
        if(i&1)dp[i]+=1.l*(i/2)/i;
    }
    cout << dp[n] << "\n";
}
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB 1st numbers differ - expected: '1.0000000000', found: '2.6333300000', error = '1.6333300000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB 1st numbers differ - expected: '1.0000000000', found: '2.6333300000', error = '1.6333300000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 340 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -