제출 #701888

#제출 시각아이디문제언어결과실행 시간메모리
701888JohannBoarding Passes (BOI22_passes)C++14
5 / 100
1 ms596 KiB
#include "bits/stdc++.h" using namespace std; typedef long long ll; #define sz(x) (int)(x).size() double expectOneGroup(int N) { ll k1 = ceil(N / (double)2), k2 = floor(N / (double)2); return (k1 * (k1 - 1) + k2 * (k2 - 1)) / (double)4; } int main() { ios::sync_with_stdio(false); cin.tie(0); string P; cin >> P; ll N = sz(P); double res = expectOneGroup(N); printf("%f\n", res); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...