結果
問題 |
No.567 コンプリート
|
ユーザー |
|
提出日時 | 2021-11-21 00:18:30 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 565 bytes |
コンパイル時間 | 2,122 ms |
コンパイル使用メモリ | 191,408 KB |
最終ジャッジ日時 | 2025-01-25 23:47:44 |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 11 TLE * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; double dp[1000001][1<<6]; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; dp[0][0] = 1; for(int i=0;i<n;i++) { for(int j=0;j<(1<<6);j++) { if(dp[i][j]<=0) continue; for(int k=0;k<6;k++) { int bitmask = (j | (1<<k)); dp[i+1][bitmask] += (dp[i][j]/6); } } } cout << fixed; cout.precision(16); cout << dp[n][63] << '\n'; return 0; }