日期:2014-05-18 浏览次数:20897 次
<html> <head> <script> function $(e) { return document.getElementById(e); } function _(e, txt) { $(e).innerHTML = txt; } function holdit(arr, arr_Hold) { var arr_Tj = new Array(11); for(var k=0; k<16; k++) { for(q=0; q<11; q++) { arr_Tj[q] = 0; } for (j=0; j<8; j++) { arr_Tj[arr_Hold[k][j]-1] = arr_Hold[k][j]; } for (j=0; j<5; j++) { arr_Tj[arr[j]-1] = arr[j]; } n = 0; for(q=0; q<11; q++) { if(arr_Tj[q] != 0) { ++n; } } if (n == 8) { return k; } } } </script> </head> <body> <script> var N = 78; arr = new Array(N); for(i=0; i<N; i++) { arr[i] = new Array(11); } var sar = [ [3,6,9,1,7], [11,3,6,7,9], [8,6,11,4,10], [1,11,9,5,7], [6,7,1,5,3], [2,4,9,10,1], [2,1,7,6,9], [11,10,2,5,4], [8,7,2,5,11], [7,5,8,11,2], [7,11,4,6,9], [4,5,6,7,3], [7,9,6,5,2], [9,2,8,5,10], [2,10,3,11,5], [9,6,4,8,3], [5,1,3,6,10], [6,10,8,1,5], [9,3,6,5,8], [10,11,3,1,7], [10,11,1,7,8], [5,2,11,4,3], [11,8,3,9,1], [11,5,2,7,3], [8,6,1,11,7], [10,3,5,8,2], [3,9,10,11,8], [7,3,8,1,5], [1,9,7,5,11], [6,5,2,1,10], [11,2,3,10,6], [9,1,4,7,6], [5,8,10,7,1], [1,4,3,8,10], [1,3,6,9,5], [11,2,5,4,7], [11,10,9,3,2], [5,9,2,7,8], [1,7,9,4,11], [7,3,1,6,11], [5,8,4,11,6], [8,5,3,11,1], [1,8,4,6,5], [9,7,10,6,3], [8,5,10,3,11], [5,8,4,11,9], [4,2,9,6,8], [2,1,3,4,10], [6,9,10,2,1], [2,5,4,8,11], [11,1,3,5,7], [2,5,9,8,4], [2,9,10,7,1], [6,7,11,2,9], [4,9,6,5,10], [9,8,4,6,1], [11,10,8,4,3], [5,4,11,3,2], [11,2,8,7,5], [8,1,3,5,2], [1,2,10,7,6], [9,4,11,8,6], [2,8,9,3,10], [4,7,1,5,8], [5,11,1,9,2], [5,6,11,9,4], [10,8,5,9,1], [11,6,10,4,2], [11,2,6,7,9], [1,9,5,10,6], [7,6,9,4,3], [1,8,6,3,5], [7,1,4,10,3], [6,9,11,10,2], [1,9,4,11,5], [3,7,4,2,5], [6,4,8,1,5], [9,8,1,4,2], ]; var wn_r8 = [[1,2,3,4,5,6,7,8], [1,2,3,4,5,6,7,9], [1,2,3,4,5,6,7,10], [1,2,3,4,5,6,7,11], [1,2,3,4,5,6,8,9], [1,2,3,4,5,6,8,10], [1,2,3,4,5,6,8,11], [1,2,3,4,5,6,9,10], [1,2,3,4,5,6,9,11], [1,2,3,4,5,6,10,11], [2,3,5,7,8,9,10,11], [3,4,6,7,8,9,10,11], [1,4,5,7,8,9,10,11], [2,5,6,7,8,9,10,11], [1,3,6,7,8,9,10,11], [1,2,4,7,8,9,10,11], ]; W = document.write; W("<div style='float:left'><table border cellpadding=0 cellspacing=0>"); for(i=N; i>=1; i--) { W("<tr>"); for(j=1; j<=11; j++) { flag = false; for(s=0; s<5; s++) { if(sar[i-1][s] == j) { k = j < 10 ? "0"+j : j; W("<td><span style='background-color:silver;font-size:28'>"+k+"</span></td>"); flag = true; break; } } if (!flag)W("<td> </td>"); } W("</tr>"); } W("</table></div><div style='float:left'> </div><div style='float:left'><table border cellpadding=0 cellspacing=0>"); for(i=N; i>=1; i--) { W("<tr>"); var k = holdit(sar