# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
580015 | 2022-06-20T13:28:33 Z | wdjpng | Boarding Passes (BOI22_passes) | C++17 | 3 ms | 468 KB |
#include <bits/stdc++.h> #define int long long #define rep(i,n) for(int i =0; i<n; i++) #define all(a) a.begin(),a.end() using namespace std; long double f(int n) { return ((long double) n)*((long double) (n-1))/4.0; } signed main() { string s; cin>>s; int n = s.size(); // cin>>n; double sum = f(n/2) + f((n+1)/2); cout.precision(10); cout<<f(n/2) + f((n+1)/2)<<'\n'; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 2 ms | 468 KB | Output is correct |
7 | Incorrect | 3 ms | 468 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 0 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 2 ms | 468 KB | Output is correct |
7 | Incorrect | 3 ms | 468 KB | Output isn't correct |
8 | Halted | 0 ms | 0 KB | - |