結果
| 問題 | No.567 コンプリート | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-10-17 18:50:27 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 535 bytes | 
| コンパイル時間 | 1,957 ms | 
| コンパイル使用メモリ | 193,820 KB | 
| 最終ジャッジ日時 | 2025-02-08 07:40:50 | 
| ジャッジサーバーID (参考情報) | judge1 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 4 | 
| other | AC * 11 TLE * 1 | 
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    
    using ld = double;
    int n; cin >> n;
    vector<ld> dp(1 << 6, 0.0);
    dp[0] = 1.0;
    rep(_,n) {
        vector<ld> nt(1 << 6, 0.0);
        rep(S,1<<6) {
            rep(i,6) {
                nt[S | (1 << i)] += dp[S] / 6.0;
            }
        }
        swap(dp, nt);
    }
    cout << fixed << setprecision(20) << dp[(1 << 6) - 1] << "\n";
}
            
            
            
        