답안 #666497

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
666497 2022-11-28T18:46:48 Z mychecksedad Boarding Passes (BOI22_passes) C++17
0 / 100
1 ms 212 KB
/* Author : Mychecksdead */
#include<bits/stdc++.h>
using namespace std;
#define setp() cout << setprecision(15)
#define all(x) x.begin(), x.end()
const int N = 1e5 + 100;

int n;
string s;
double dp[N];
void solve(){
    cin >> n >> s;

    double k1 = n/2;
    double k2 = (n+1)/2;

    cout << ((k1*(k1-1) + k2*(k2-1)) / 4.0);
}



int main(){
    cin.tie(0); ios::sync_with_stdio(0);
    int T = 1, aa;
    // cin >> T;aa=T;
    setp();
    while(T--){
        // cout << "Case #" << aa-T << ": ";
        solve();
        cout << '\n';
    }
    return 0;
 
}

Compilation message

passes.cpp: In function 'int main()':
passes.cpp:24:16: warning: unused variable 'aa' [-Wunused-variable]
   24 |     int T = 1, aa;
      |                ^~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st numbers differ - expected: '100800.5000000000', found: '-0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB 1st numbers differ - expected: '1.0000000000', found: '-0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 212 KB 1st numbers differ - expected: '1.0000000000', found: '-0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 0 ms 212 KB 1st numbers differ - expected: '100800.5000000000', found: '-0.0000000000', error = '1.0000000000'
2 Halted 0 ms 0 KB -