結果

問題 No.574 正多面体サイコロ
ユーザー karinohitokarinohito
提出日時 2021-09-04 01:10:00
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 776 bytes
コンパイル時間 3,693 ms
コンパイル使用メモリ 169,608 KB
実行使用メモリ 12,000 KB
最終ジャッジ日時 2023-08-22 03:56:52
合計ジャッジ時間 8,545 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 TLE -
testcase_01 -- -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define all(A) A.begin(),A.end()
using vll = vector<ll>;
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
using Graph = vector<vector<ll>>;
ll mod=998244353;
ll inva(ll N) {
    ll a = N, b = mod, c = 1, d = 0;
    while (b > 0) {
        ll t = a / b;
        a -= t * b;
        swap(a, b);
        c -= t * d;
        swap(c, d);

    }
    c %= mod;
    if (c < 0)c += mod;
    return c;

}//割り算時に使う逆元を求める.


int main() {
    ll F,N,K;
    cin>>F>>N>>K;
    ll an=0;
    rep(i,5000000){
        vll A(N);
        rep(n,N){
            A[n]=1+rand()%F;
        }
        sort(all(A));
        an+=A[N-K];
    }
    cout<<setprecision(16)<<(an)/5000000.0<<endl;
}
0