这个只会用暴力了
#include <array.au3>
Local $array[10],$result[1]=[1]
For $array[0] =1 To 4
For $array[1] =1 To 4
For $array[2] =1 To 4
For $array[3] = 1 To 4
For $array[4] =1 To 4
For $array[5] =1 To 4
For $array[6] =1 To 4
For $array[7] =1 To 4
For $array[8] =1 To 4
For $array[9] =1 To 4
If hs1() And hs2() And hs4() And hs5() And hs6() And hs7() And hs8() And hs9() And hs10() Then
$result[0]+=1
ReDim $result[$result[0]]
$result[$result[0] -1]=$array[0]&","&$array[1]&","&$array[2]&","&$array[3]&","&$array[4]&","&$array[5]&","&$array[6]&","&$array[7]&","&$array[8]&","&$array[9]
EndIf
Next
Next
Next
Next
Next
Next
Next
Next
Next
Next
_ArrayDisplay($result)
Func hs1()
Local $i,$count=0
For $i=0 To 9
If $array[$i] = 1 Then $count+=1
Next
If $count < 6 And $count > 1 Then Return 1
Return 0
EndFunc
Func hs2()
Local $i,$count=0
For $i=0 To 8
If $array[$i] = 1 And $array[$i+1] =2 Then $count+=1
Next
If $count = $array[1] Then Return 1
Return 0
EndFunc
Func hs4()
If $array[3] + $array[7] = 5 Then Return 1
Return 0
EndFunc
Func hs5()
If $array[4] = $array[6] Or $array[4] = $array[7] Or $array[4] = $array[8] Or $array[4] = $array[9] And $array[6]+$array[7]+$array[8]+$array[9] = 10 Then Return 1
Return 0
EndFunc
Func hs6()
Local $i ,$count=0
For $i = 0 To 7
If $array[$i] = 3 And $array[$i+1] = 3 And $array[$i+2] = 3 Then $count+=1
Next
If $count = 4 - $array[5] Then Return 1
Return 0
EndFunc
Func hs7()
If $array[0]=$array[6] Then Return 1
Return 0
EndFunc
Func hs8()
If $array[7] = $array[0] Or $array[7] = $array[1] Or $array[7] = $array[2] Or $array[7] = $array[3] And $array[0]+$array[1]+$array[2]+$array[3] = 10 Then Return 1
Return 0
EndFunc
Func hs9()
Switch $array[0]+$array[1]+$array[2]+$array[3]+$array[4]
Case 7
If $array[8] = 1 Then Return 1
Return 0
Case 10
If $array[8] = 2 Then Return 1
Return 0
Case 13
If $array[8] = 3 Then Return 1
Return 0
Case 16
If $array[8] = 4 Then Return 1
Return 0
Case Else
Return 0
EndSwitch
EndFunc
Func hs10()
Switch $array[5]+$array[6]+$array[7]+$array[8]+$array[9]
Case 4
If $array[9] = 1 Then Return 1
Return 0
Case 7
If $array[9] = 2 Then Return 1
Return 0
Case 10
If $array[9] = 3 Then Return 1
Return 0
Case 13
If $array[9] = 4 Then Return 1
Return 0
Case Else
Return 0
EndSwitch
EndFunc
|