結果
問題 | No.574 正多面体サイコロ |
ユーザー |
|
提出日時 | 2021-09-04 01:10:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 776 bytes |
コンパイル時間 | 2,127 ms |
コンパイル使用メモリ | 173,308 KB |
実行使用メモリ | 17,096 KB |
最終ジャッジ日時 | 2024-12-15 21:43:48 |
合計ジャッジ時間 | 62,362 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 TLE * 1 |
other | WA * 3 TLE * 17 |
ソースコード
#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; }