hiho week 174 register

Ended

Participants:302

Verdict:Accepted
Score:100 / 100
Submitted:2017-10-31 10:27:55

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<cstdio>
#include<cmath>
#include<iostream>
using namespace std;
const int MAXN=101;
const int MAXM=601;
int n,m;
double f[MAXN][MAXM];
void table()
{
    f[1][1]=1;f[1][2]=1;f[1][3]=1;
    f[1][4]=1;f[1][5]=1;f[1][6]=1;
    for(int i=2;i<MAXN;i++)
    {
        int tar=i*6;
        for(int j=i;j<=tar;j++)
        {
            int flag1=j,flag2=0;
            double tem=0.0;
            while(--flag1&&flag2<6)
            {
                tem+=f[i-1][flag1];
                flag2++;
            }
            f[i][j]=tem;
        }
    }
}
int main()
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX