Submission #938523

# Submission time Handle Problem Language Result Execution time Memory
938523 2024-03-05T08:49:26 Z LucaIlie Boarding Passes (BOI22_passes) C++17
0 / 100
1 ms 348 KB
#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();
    cin >> n;

    cout << fixed << setprecision( 3 ) << expectedInversions( n / 2 ) + expectedInversions( n - n / 2 );

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 1st numbers differ - expected: '100800.5000000000', found: '-0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 1st numbers differ - expected: '1.0000000000', found: '-0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB 1st numbers differ - expected: '1.0000000000', found: '-0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB 1st numbers differ - expected: '100800.5000000000', found: '-0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -