답안 #999983

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
999983 2024-06-16T12:10:18 Z pudelos Boarding Passes (BOI22_passes) C++17
0 / 100
1 ms 600 KB
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for(int i=a; i<=b; ++i)
#define ll long long
#define ld long double

int main() {
  cin.tie(0) -> ios_base::sync_with_stdio(0);
  string s;
  cin >> s;
  int n = s.size();

  int l = n/2;
  int r = n/2+n%2;

  ll sum = l*(l-1) + r*(r-1);
  ld w = (ld)(sum)/4;
  cout << fixed << setprecision(15) << w << '\n';
}
# 결과 실행 시간 메모리 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 600 KB 1st numbers differ - expected: '772893586.0000000000', found: '-300848238.0000000000', error = '1.3892492362'
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 600 KB 1st numbers differ - expected: '772893586.0000000000', found: '-300848238.0000000000', error = '1.3892492362'
7 Halted 0 ms 0 KB -