Project Euler 54

时间:2021-12-13 05:18:29
#include<bits/stdc++.h>
using namespace std;
];
];
;
map<char,int> mp;
//map<char,char> cc;
int x,x1,x2,x3,x4,x5;
int y,y1,y2,y3,y4,y5;
]]<mp[yy[]];}
void mm()
{
    sort(ss,ss+,up);
    ,s=,d=,h=;
    ;i<=;i++)
    {
        ]=='C') c++;
        ]=='S') s++;
        ]=='D') d++;
        ]=='H') h++;
    }
    ||s==||d==||h==)  // 6 9 10;
    {
        ;
        ][]]+!=mp[ss[][]])t=;
        ][]]+!=mp[ss[][]])t=;
        ][]]+!=mp[ss[][]])t=;
        ][]]+==mp[ss[][]] || (mp[ss[][]]==&&mp[ss[][]]==) ) t=t;
        ;
       // else if(mp[ss[3][0]]==5 && mp[ss[4][0]]==14) t=t;
       // else t=0;
        ) {x=;  x1=mp[ss[][]];  x2=mp[ss[][]];  x3=mp[ss[][]];  x4=mp[ss[][]]; x5=mp[ss[][]];}
        ;  x1=mp[ss[][]];  x2=mp[ss[][]];  x3=mp[ss[][]];  x4=mp[ss[][]]; x5=mp[ss[][]];}
        return ;
    }
    )// 2 3 4 7 8
    {
        ][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]]  )
        {
            x=; x1=mp[ss[][]]; x2=mp[ss[][]]; return ;// 2 2 2 2 3  ***********************************
        }
        ][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]]  )
        {
            x=; x1=mp[ss[][]]; x2=mp[ss[][]]; return ;// 2 3 3 3 3  ************************************
        }
        ][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]] && mp[ss[][]]==mp[ss[][]]  )
        {
            x=; x1=mp[ss[][]]; x2=mp[ss[][]];return ;// 2 2 2 3 3 +++++++++++++++++++++++++++
        }
        ][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]] && mp[ss[][]]==mp[ss[][]]  )
        {
            x=; x1=mp[ss[][]]; x2=mp[ss[][]]; return ;// 3 3 4 4 4  ++++++++++++++++++++++++++
        }
         ][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]] )
        {
           x=; x1=mp[ss[][]]; x2=mp[ss[][]]; x3=mp[ss[][]]; return ;// 2 2 2 3 4        --------------------------
        }
         ][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]] )
        {
            x=; x1=mp[ss[][]];x2=mp[ss[][]]; x3=mp[ss[][]]; return ;// 2 3 3 3 4         --------------------------
        }
        ][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]] )
        {
            x=; x1=mp[ss[][]];x2=mp[ss[][]]; x3=mp[ss[][]]; return ;// 2 3 4 4 4         ---------------------------
        }
        ][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]] )
        {
             x=; x1=mp[ss[][]]; x2=mp[ss[][]]; x3=mp[ss[][]]; return ; // 2 2 3 3 4   -------------          ------
        }
        ][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]] )
        {
             x=; x1=mp[ss[][]]; x2=mp[ss[][]]; x3=mp[ss[][]]; return ;//  2 3 3 4 4   ------------          --------
        }
        ][]]==mp[ss[][]] &&mp[ss[][]]==mp[ss[][]] )
        {
             x=; x1=mp[ss[][]]; x2=mp[ss[][]]; x3=mp[ss[][]]; return ;//  2 2 3 4 4   ------------          --------
        }
        ][]]==mp[ss[][]]) {x=; x1=mp[ss[][]]; x2=mp[ss[][]]; x3=mp[ss[][]]; x4=mp[ss[][]]; return ;} // 2 2 3 4 5
        ][]]==mp[ss[][]]) {x=; x1=mp[ss[][]]; x2=mp[ss[][]]; x3=mp[ss[][]]; x4=mp[ss[][]]; return ;} // 2 3 3 4 5
        ][]]==mp[ss[][]]) {x=; x1=mp[ss[][]]; x2=mp[ss[][]]; x3=mp[ss[][]]; x4=mp[ss[][]]; return ;} // 2 3 4 4 5
        ][]]==mp[ss[][]]) {x=; x1=mp[ss[][]]; x2=mp[ss[][]]; x3=mp[ss[][]]; x4=mp[ss[][]]; return ;} // 2 3 4 5 5
    }
    )// 1 5
    {
        ;
        ][]]+!=mp[ss[][]]) t=;
        ][]]+!=mp[ss[][]]) t=;
        ][]]+!=mp[ss[][]]) t=;
        ][]]+==mp[ss[][]] || (mp[ss[][]]==&&mp[ss[][]]==) ) t=t;
        ;
        //else if(mp[ss[3][0]]==5 && mp[ss[4][0]]==14) t=t ;
       // else t=0;
        ) {x=;  x1=mp[ss[][]];  x2=mp[ss[][]];  x3=mp[ss[][]];  x4=mp[ss[][]]; x5=mp[ss[][]];}
        ;  x1=mp[ss[][]];  x2=mp[ss[][]];  x3=mp[ss[][]];  x4=mp[ss[][]]; x5=mp[ss[][]];}
        return ;
    }
}
void make()
{
   x=,x1=,x2=,x3=,x4=,x5=;
   y=,y1=,y2=,y3=,y4=,y5=;
   mm();
   y=x; y1=x1;y2=x2; y3=x3; y4=x4; y5=x5;
     x=,x1=,x2=,x3=,x4=,x5=;
   ss[]=tt[];ss[]=tt[]; ss[]=tt[]; ss[]=tt[]; ss[]=tt[];
   mm();
   if(y>x)  {num++;return;}if(y<x)return ;
   if(y1>x1){num++;return;}if(y1<x1) return ;
   if(y2>x2){num++;return;}if(y2<x2) return ;
   if(y3>x3){num++;return;}if(y3<x3) return ;
   if(y4>x4){num++;return;}if(y4<x4) return ;
   if(y5>x5){num++;return;}if(y5<x5) return ;
   return ;
}
int main()
{
    mp[;mp[;mp[;mp[; mp[;
    mp[;mp[;mp[;mp[;
    mp[; mp[; mp[; mp[;
   // cc['C']=1;  cc['S']=2;  cc['D']=3; cc['H']=4;
    freopen("1.txt","r",stdin);
    ;i<=;i++)
    {
        ;j<=;j++)cin>>ss[j];
       // for(int j=0;j<=4;j++)cout<<ss[j]<<" ";
        ;j<=;j++)cin>>tt[j];
        //for(int j=0;j<=4;j++)cout<<ss[j]<<" ";
        make();

    }
    cout<<num<<endl;
}