Submission #603966

# Submission time Handle Problem Language Result Execution time Memory
603966 2022-07-24T14:10:34 Z Ahmadsm2005 Boarding Passes (BOI22_passes) C++17
5 / 100
1 ms 596 KB
#include <bits/stdc++.h>
#define int long long
using namespace std;
/*int N,M,V[200001],X,Y;
bool R[200001];
vector<int>edges[200001];
void BFS(int X){
    priority_queue<pair<int,int>>Q;
    int CNT = V[X];
    Q.push({0,X});
    while(Q.size()){
        int F = Q.top().second;
        if(VIS[F])
    }
}*/
int32_t main()
{
    cin.tie(0),iostream::sync_with_stdio(0);
    string s;
    cin>>s;
    long double A = s.size();
    //cin>>A;
    if(s.size()%2)
    cout<<fixed<<setprecision(10)<<((A / 2) * (A / 2 - 1) + 0.25) / 2;
    else
    cout<<fixed<<setprecision(10)<<((A / 2) * (A / 2 - 1)) / 2;
    /*cin>>N>>M;
    for(int i = 0; i < N; i += 1){
        cin>>V[i];
    }
    for(int i = 0; i < M; i += 1){
        cin>>X>>Y;
        edges[X - 1].push_back(Y - 1),edges[Y - 1].push_back(X - 1);
    }
    for(int i = 0; i < N; i += 1){
        BFS(i);
    }
    for(int i = 0; i < N; i += 1)cout<<R[i];*/
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB found '100800.5000000000', expected '100800.5000000000', error '0.0000000000'
2 Correct 1 ms 224 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
3 Correct 0 ms 320 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
4 Correct 1 ms 212 KB found '1.0000000000', expected '1.0000000000', error '0.0000000000'
5 Correct 1 ms 320 KB found '124002.0000000000', expected '124002.0000000000', error '0.0000000000'
6 Correct 1 ms 468 KB found '772893586.0000000000', expected '772893586.0000000000', error '0.0000000000'
7 Correct 1 ms 584 KB found '1100977812.5000000000', expected '1100977812.5000000000', error '0.0000000000'
8 Correct 1 ms 596 KB found '1249950000.5000000000', expected '1249950000.5000000000', error '0.0000000000'
9 Correct 1 ms 596 KB found '1249975000.0000000000', expected '1249975000.0000000000', error '0.0000000000'
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 320 KB 1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 320 KB 1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB found '100800.5000000000', expected '100800.5000000000', error '0.0000000000'
2 Correct 1 ms 224 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
3 Correct 0 ms 320 KB found '0.0000000000', expected '0.0000000000', error '-0.0000000000'
4 Correct 1 ms 212 KB found '1.0000000000', expected '1.0000000000', error '0.0000000000'
5 Correct 1 ms 320 KB found '124002.0000000000', expected '124002.0000000000', error '0.0000000000'
6 Correct 1 ms 468 KB found '772893586.0000000000', expected '772893586.0000000000', error '0.0000000000'
7 Correct 1 ms 584 KB found '1100977812.5000000000', expected '1100977812.5000000000', error '0.0000000000'
8 Correct 1 ms 596 KB found '1249950000.5000000000', expected '1249950000.5000000000', error '0.0000000000'
9 Correct 1 ms 596 KB found '1249975000.0000000000', expected '1249975000.0000000000', error '0.0000000000'
10 Incorrect 1 ms 320 KB 1st numbers differ - expected: '1.0000000000', found: '3.0000000000', error = '2.0000000000'
11 Halted 0 ms 0 KB -