제출 #722321

#제출 시각아이디문제언어결과실행 시간메모리
722321HamletPetrosyanBoarding Passes (BOI22_passes)C++17
0 / 100
0 ms280 KiB
/// -- -- ---- --- -- -- /// 11.04.2023 Tue 22:18 /// -- -- ---- --- -- -- #include <bits/stdc++.h> using namespace std; void abandoned_precalc(); #define pll pair<long long, long long> #define all(a) (a).begin(), (a).end() #define len(a) ((long long)(a).size()) #define add push_back #define mkp make_pair #define ll long long #define fr first #define sc second const long long INF = 1000000000ll * 1000000003ll; const long long MOD = 1000000007ll; const int N = 2e5 + 5; string s; ll ans4 = INF; void solve(){ cin >> s; for(ll i = 0; i <= len(s); i++){ ans4 = min(ans4, i * (i - 1) + (len(s) - i) * (len(s) - i - 1)); } cout << (double)ans4 / 4. << "\n"; } int main(){ ios_base::sync_with_stdio(false); cin.tie(0); int _ = 1; // cout << fixed; // cout.precision(9); abandoned_precalc(); // cin >> _ ; while(_--) solve(); return 0; } /// ---- - -------- ------ -------- -- - - - /// just a reminder. ubuntu password is i o i /// ---- - -------- ------ -------- -- - - - void abandoned_precalc(){ }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...