結果

問題 No.242 ビンゴゲーム
ユーザー tempura_pptempura_pp
提出日時 2018-10-14 19:05:10
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 854 bytes
コンパイル時間 679 ms
コンパイル使用メモリ 86,224 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-02 20:09:57
合計ジャッジ時間 2,643 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 2 ms
4,376 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
using namespace std;
#define REP(i,m,n) for(int i=(int)m ; i < (int) n ; ++i )
#define rep(i,n) REP(i,0,n)
typedef long long ll;
typedef pair<int,int> pint;
typedef pair<ll,int> pli;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

ll dp[6000];
ll cnt[6000];
int main(){
    int n;cin>>n;
    if(n<=4){
        cout<<0<<endl;
        return 0;
    }
    double comb[100][100];
    comb[0][0]=1.0;
    rep(i,100)rep(j,i+2){
        if(j==0)comb[i+1][j]=1.0;
        else comb[i+1][j]=comb[i][j]+comb[i][j-1];
    }
    cout<<setprecision(12)<<comb[94][n-5]/comb[99][n]*12<<endl;
    return 0;
}
0