結果
問題 | No.574 正多面体サイコロ |
ユーザー |
|
提出日時 | 2021-09-04 01:10:24 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 775 bytes |
コンパイル時間 | 1,357 ms |
コンパイル使用メモリ | 173,292 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-15 21:47:13 |
合計ジャッジ時間 | 25,548 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 TLE * 1 |
other | WA * 18 TLE * 2 |
ソースコード
#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,500000){ 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; }