# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1121507 | vjudge1 | Boarding Passes (BOI22_passes) | C++17 | 1 ms | 336 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int n, g;
string s;
int main() {
cin >> s;
for(int i = 0; i < s.size(); i++) {
g = max(s[i] - 'A', g);
}
long long n = s.size();
if(g == 0) {
double ans = 1e18;
for(int i = 0; i <= n; i++) {
ans = min(ans, i * (i-1.0)/4 + (n-i) * (n-i-1.0)/4);
}
cout << ans << "\n";
return 0;
}
cout << 1 << "\n";
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |