hiho week 141 register

Ended

Participants:363

Verdict:Accepted
Score:100 / 100
Submitted:2017-03-11 20:00:04

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 <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int inf=1e8+1;
int dp[52][52][52][4][4][4],ans;
int get_dp()
{
    memset(dp,inf,sizeof(dp));
    dp[1][0][0][0][0][3]=1;
    dp[0][1][0][1][0][3]=1;
    dp[0][0][1][2][0][3]=1;
    for(int i=0;i<=50;i++)
    {
        for(int j=0;j<=50;j++)
        {
            for(int k=0;k<=50;k++)
            {
               for(int li=0;li<3;li++)
               {
                   for(int lj=0;lj<3;lj++)
                   {
                       for(int lk=1;lk<=3;lk++)
                       {
                          if(dp[i][j][k][li][lj][lk]!=inf)//iA,jB,kC,li,lj,lk,
                          {
                            for(int ad=0;ad<3;ad++)
                            {
                                int fi=i,fj=j,fk=k;
                                if(ad==0)fi++;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX