Submission #1098910

# Submission time Handle Problem Language Result Execution time Memory
1098910 2024-10-10T10:10:18 Z ohad Boarding Passes (BOI22_passes) C++14
0 / 100
1 ms 604 KB
#include <iostream>
#include <vector>
#include <cmath>
#include <iomanip>
#include <stdio.h>
using namespace std;
typedef long long ll;

int main() {
	string a;
	cin >> a;
	ll size = a.length();
	if (size % 2 == 0)
		cout << (size / 2 * (size / 2 - 1)) / double(2);
	else
	{
		double x = ((size / 2 * (size / 2 - 1)) / double(4));
		double y = ((size / 2 + 1) * (size / 2)) / double(4);
		y += x;
		cout << fixed << setprecision(6) << y;
	}
}


# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB found '100800.5000000000', expected '100800.5000000000', error '0.0000000000'
2 Correct 0 ms 348 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
3 Correct 0 ms 348 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
4 Correct 0 ms 348 KB found '1.0000000000', expected '1.0000000000', error '0.0000000000'
5 Correct 0 ms 348 KB found '124002.0000000000', expected '124002.0000000000', error '0.0000000000'
6 Incorrect 1 ms 604 KB 1st numbers differ - expected: '772893586.0000000000', found: '772894000.0000000000', error = '0.0000005356'
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 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 348 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 348 KB found '100800.5000000000', expected '100800.5000000000', error '0.0000000000'
2 Correct 0 ms 348 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
3 Correct 0 ms 348 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
4 Correct 0 ms 348 KB found '1.0000000000', expected '1.0000000000', error '0.0000000000'
5 Correct 0 ms 348 KB found '124002.0000000000', expected '124002.0000000000', error '0.0000000000'
6 Incorrect 1 ms 604 KB 1st numbers differ - expected: '772893586.0000000000', found: '772894000.0000000000', error = '0.0000005356'
7 Halted 0 ms 0 KB -