# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
666361 | 2022-11-28T09:47:05 Z | mychecksedad | Boarding Passes (BOI22_passes) | C++17 | 0 ms | 0 KB |
/* Author : Mychecksdead */ #include<bits/stdc++.h> using namespace std; #define setp() cout << setprecision(15) #define all(x) x.begin(), x.end() int n; string s; double dp[N]; void solve(){ cin >> n >> s; dp[1] = 0; for(float i = 2; i <= n; ++i) dp[i] = dp[i - 1] + (n-1)/2.0; cout << dp[n]; } int main(){ cin.tie(0); ios::sync_with_stdio(0); int T = 1, aa; // cin >> T;aa=T; while(T--){ // cout << "Case #" << aa-T << ": "; solve(); cout << '\n'; } return 0; }