1 /* 2 3 */ 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #define maxn 30 14 using namespace std; 15 int num1(char c){ 16 if (c>='2' && c<='9') return c-'0'; 17 if (c=='T') return 10; 18 if (c=='J') return 11; 19 if (c=='Q') return 12; 20 if (c=='K') return 13; 21 if (c=='A') return 14; 22 } 23 int num2(char c){ 24 if (c=='H') return 4; 25 if (c=='S') return 3; 26 if (c=='D') return 2; 27 if (c=='C') return 1; 28 } 29 int comp(char sx[],char sy[]){ 30 int k1,k2,t1,t2; 31 k1=num1(sx[0]); 32 k2=num1(sy[0]); 33 t1=num2(sx[1]); 34 t2=num2(sy[1]); 35 if (k1==k2) { 36 if (t1>t2) return 1; 37 if (t1==t2) return 0; 38 if (t1
G[maxn*2]; 48 49 bool dfs(int s)//找到从s点出发的可增广路 50 { 51 for(int i=0;i