結果

問題 No.567 コンプリート
ユーザー FukumotoFukumoto
提出日時 2020-06-13 16:08:14
言語 C++17(clang)
(17.0.6 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 386 bytes
コンパイル時間 499 ms
コンパイル使用メモリ 119,936 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-05-07 21:55:50
合計ジャッジ時間 1,438 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 1 ms
6,944 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 2 ms
6,944 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 2 ms
6,944 KB
testcase_12 AC 2 ms
6,944 KB
testcase_13 AC 2 ms
6,944 KB
testcase_14 WA -
testcase_15 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

#define rep(i, n) for(int i = 0; i < (n); i++)
#define f(i, n, m) for(int i = n; i < (m); i++)

using namespace std;
float dp[1 << 6][100005];

int main() {
	int n;
	cin >> n;

	dp[0][0] = 1;

	f(i, 1, n + 1) {
		rep(j, 1 << 6) {
			rep(k, 6) {
				int m = 1 << k;
				dp[i][j | m] += dp[i - 1][j] / 6;
			}
		}
	}

	cout << dp[n][(1 << 6)-1] << endl;

	return 0;
}
0