老大们,为什么会是这样的结果?
程序很简单,只是想不出来怎么是这个结果,环境是vc2008。部分结果如下:
第 0 期
3后面个数:
14后面个数:
15后面个数:
20后面个数:
23后面个数:
30后面个数:
___________________________________________________
第 1 期
8后面个数:
9后面个数:
18后面个数:
20后面个数:
25后面个数:
29后面个数:
___________________________________________________
第 2 期
2后面个数:
11后面个数:
17后面个数:
27后面个数:
30后面个数:
33后面个数:24,24,24,24,24,24,
___________________________________________________
第 3 期
1后面个数:3,3,3,3,3,3,
2后面个数:5,5,5,5,5,5,
5后面个数:7,7,7,7,7,7,
10后面个数:8,8,8,8,8,8,
19后面个数:14,14,14,14,14,14,
24后面个数:31,31,31,31,31,31,
___________________________________________________
第 4 期
3后面个数:6,6,6,6,6,6,
5后面个数:11,11,11,11,11,11,
7后面个数:17,17,17,17,17,17,
8后面个数:20,20,20,20,20,20,
14后面个数:23,23,23,23,23,23,
31后面个数:24,24,24,24,24,24,
___________________________________________________
第 5 期
6后面个数:20,20,20,20,20,20,
11后面个数:22,22,22,22,22,22,
17后面个数:26,26,26,26,26,26,
20后面个数:29,29,29,29,29,29,
23后面个数:30,30,30,30,30,30,
24后面个数:32,32,32,32,32,32,
___________________________________________________
第 6 期
20后面个数:2,2,2,2,2,2,
22后面个数:8,8,8,8,8,8,
26后面个数:10,10,10,10,10,10,
29后面个数:16,16,16,16,16,16,
30后面个数:27,27,27,27,27,27,
32后面个数:30,30,30,30,30,30,
___________________________________________________
第 7 期
2后面个数:1,1,1,1,1,1,
8后面个数:2,2,2,2,2,2,
10后面个数:
16后面个数:
27后面个数:
30后面个数:
___________________________________________________
第 8 期
1后面个数:
2后面个数:
15后面个数:
18后面个数:
20后面个数:
29后面个数:
___________________________________________________
第 9 期
7后面个数:
8后面个数:
20后面个数:
23后面个数:
28后面个数:
29后面个数:33,33,33,33,33,33,
___________________________________________________
第 10 期
4后面个数:5,5,5,5,5,5,
10后面个数:6,6,6,6,6,6,
17后面个数:7,7,7,7,7,7,
28后面个数:14,14,14,14,14,14,
32后面个数:25,25,25,25,25,25,
33后面个数:28,28,28,28,28,28,
___________________________________________________
第 11 期
5后面个数:4,4,4,4,4,4,
6后面个数:10,10,10,10,10,10,
7后面个数:
14后面个数:
25后面个数:
28后面个数:
___________________________________________________
第 12 期
4后面个数:
10后面个数:
13后面个数:
15后面个数:
19后面个数:
30后面个数:
___________________________________________________
第 13 期
2后面个数:
4后面个数:
7后面个数:
14后面个数:
15后面个数:
25后面个数:
___________________________________________________
第 14 期
6后面个数:
7后面个数:
18后面个数:
24后面个数:
30后面个数:
32后面个数:
___________________________________________________
第 15 期
4后面个数:
12后面个数:
20后面个数:
25后面个数:
28后面个数:
29后面个数:32,32,32,32,32,32,
___________________________________________________
第 16 期
3后面个数:2,2,2,2,2,2,
5后面个数:9,9,9,9,9,9,
11后面个数:13,13,13,13,13,13,
12后面个数:15,15,15,15,15,15,
31后面个数:19,19,19,19,19,19,
32后面个数:24,24,24,24,24,24,
___________________________________________________
第 17 期
2后面个数:5,5,5,5,5,5,
9后面个数:17,17,17,17,17,17,
13后面个数:21,21,21,21,21,21,
15后面个数:25,25,25,25,25,25,
19后面个数:27,27,27,27,27,27,
24后面个数:32,32,32,32,32,32,
___________________________________________________
第 18 期
5后面个数:5,5,5,5,5,5,
17后面个数:9,9,9,9,9,9,
21后面个数:15,15,15,15,15,15,
25后面个数:21,21,21,21,21,21,
27后面个数:26,26,26,26,26,26,
32后面个数:31,31,31,31,31,31,
___________________________________________________
第 19 期
5后面个数:12,12,12,12,12,12,
9后面个数:16,16,16,16,16,16,
15后面个数:25,25,25,25,25,25,
21后面个数:26,26,26,26,26,26,
26后面个数:27,27,27,27,27,27,
31后面个数:31,31,31,31,31,31,
___________________________________________________
第 20 期
12后面个数:6,6,6,6,6,6,
16后面个数:7,7,7,7,7,7,
25后面个数:10,10,10,10,10,10,
26后面个数:12,12,12,12,12,12,
27后面个数:15,15,15,15,15,15,
31后面个数:21,21,21,21,21,21,
___________________________________________________
第 21 期
6后面个数:1,1,1,1,1,1,
7后面个数:2,2,2,2,2,2,
10后面个数:8,8,8,8,8,8,
12后面个数:12,12,12,12,12,12,
15后面个数:16,16,16,16,16,16,
21后面个数:30,30,30,30,30,30,
___________________________________________________
第 22 期
1后面个数:2,2,2,2,2,2,
2后面个数:4,4,4,4,4,4,
8后面个数:6,6,6,6,6,6,
12后面个数:10,10,10,10,10,10,
16后面个数:25,25,25,25,25,25,
30后面个数:30,30,30,30,30,30,
___________________________________________________
第 23 期
2后面个数:7,7,7,7,7,7,
4后面个数:14,14,14,14,14,14,
6后面个数:16,16,16,16,16,16,
10后面个数:27,27,27,27,27,27,
25后面个数:29,29,29,29,29,29,
30后面个数:32,32,32,32,32,32,
___________________________________________________
第 24 期
7后面个数:9,9,9,9,9,9,
14后面个数:13,13,13,13,13,13,
16后面个数:20,20,20,20,20,20,
27后面个数:22,22,22,22,22,22,
29后面个数:25,25,25,25,25,25,
32后面个数:28,28,28,28,28,28,
___________________________________________________
第 25 期
9后面个数:3,3,3,3,3,3,
13后面个数:4,4,4,4,4,4,
20后面个数:22,22,22,22,22,22,
22后面个数:23,23,23,23,23,23,
25后面个数:28,28,28,28,28,28,
28后面个数:30,30,30,30,30,30,
___________________________________________________
第 26 期
3后面个数:6,6,6,6,6,6,
4后面个数:7,7,7,7,7,7,
22后面个数:8,8,8,8,8,8,
23后面个数:22,22,22,22,22,22,
28后面个数:26,26,26,26,26,26,
30后面个数:27,27,27,27,27,27,
___________________________________________________
第 27 期
6后面个数:3,3,3,3,3,3,
7后面个数:5,5,5,5,5,5,
8后面个数:
22后面个数:
26后面个数:
27后面个数:
___________________________________________________
第 28 期
3后面个数:
5后面个数:
6后面个数:
10后面个数:
19后面个数:
23后面个数:
___________________________________________________
第 29 期
2后面个数:
11后面个数:
12后面个数:
14后面个数:
15后面个数:
16后面个数:
___________________________________________________
第 30 期
5后面个数:
8后面个数:
15后面个数:
16后面个数:
26后面个数:
32后面个数:
___________________________________________________
第 31 期
6后面个数:
7后面个数:
16后面个数:
17后面个数:
24后面个数:
25后面个数:
___________________________________________________
第 32 期
2后面个数:
3后面个数:
7后面个数:
12后面个数:
13后面个数:
30后面个数:
___________________________________________________
第 33 期
16后面个数:
23后面个数:14,14,14,14,14,14,
25后面个数:15,15,15,15,15,15,
26后面个数:
32后面个数:
33后面个数:
程序如下:
// c1.cpp : 定义控制台应用程序的入口点。
//
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
int i,j,a,x,y,k,z,e,f,b,s;
int z1=0,a1=9,a2=9,a3=9,a4=9,a5=9,a6=9,b1=9,b2=9,b3=9,b4=9,b5=9,b6=9,c1=9,c2=9,c3=9,c4=9,c5=9,c6=9,d1=9,d2=9,d3=9,d4=9,d5=9,d6=9,e1=9,e2=9,e3=9,e4=9,e5=9,e6=9,f1=9,f2=9,f3=9,f4=9,f5=9,f6=9;
int x1=0,x2=0,x3=0,x4=0,x5=0,x6=0;
int m[100][6]={
{ 3 , 14 , 15 , 20 , 23 , 30 } ,
{ 8 , 9 , 18 , 20 , 25 , 29 } ,
{ 2 , 11 , 17 , 27 , 30 , 33 } ,
{ 1 , 2 , 5 , 10 , 19 , 24 } ,
{ 3 , 5 , 7 , 8 , 14 , 31 } ,
{ 6 , 11 , 17 , 20 , 23 , 24 } ,
{ 20 , 22 , 26 , 29 , 30 , 32 } ,
{ 2 , 8 , 10 , 16 , 27 , 30 } ,
{ 1 , 2 , 15 , 18 , 20 , 29 } ,
{ 7 , 8 , 20 , 23 , 28 , 29 } ,
{ 4 , 10 , 17 , 28 , 32 , 33 } ,
{ 5 , 6 , 7 , 14 , 25 , 28 } ,
{ 4 , 10 , 13 , 15 , 19 , 30 } ,
{ 2 , 4 , 7 , 14 , 15 , 25 } ,
{ 6 , 7 , 18 , 24 , 30 , 32 } ,
{ 4 , 12 , 20 , 25 , 28 , 29 } ,
{ 3 , 5 , 11 , 12 , 31 , 32 } ,
{ 2 , 9 , 13 , 15 , 19 , 24 } ,
{ 5 , 17 , 21 , 25 , 27 , 32 } ,
{ 5 , 9 , 15 , 21 , 26 , 31 } ,
{ 12 , 16 , 25 , 26 , 27 , 31 } ,
{ 6 , 7 , 10 , 12 , 15 , 21 } ,
{ 1 , 2 , 8 , 12 , 16 , 30 } ,
{ 2 , 4 , 6 , 10 , 25 , 30 } ,
{ 7 , 14 , 16 , 27 , 29 , 32 } ,
{ 9 , 13 , 20 , 22 , 25 , 28 } ,
{ 3 , 4 , 22 , 23 , 28 , 30 } ,
{ 6 , 7 , 8 , 22 , 26 , 27 } ,
{ 3 , 5 , 6 , 10 , 19 , 23 } ,
{ 2 , 11 , 12 , 14 , 15 , 16 } ,
{ 5 , 8 , 15 , 16 , 26 , 32 } ,
{ 6 , 7 , 16 , 17 , 24 , 25 } ,
{ 2 , 3 , 7 , 12 , 13 , 30 } ,
{ 16 , 23 , 25 , 26 , 32 , 33 } ,
{ 4 , 14 , 15 , 21 , 23 , 30 } ,
{ 5 , 9 , 13 , 18 , 20 , 32 } ,
{ 3 , 5 , 12 , 15 , 28 , 33 } ,
{ 1 , 3 , 14 , 19 , 30 , 33 } ,
{ 1 , 4 , 14 , 22 , 30 , 33 } ,
{ 8 , 12 , 14 , 15 , 17 , 21 } ,
{ 4 , 7 , 14 , 26 , 32 , 33 } ,
{ 1 , 5 , 15 , 17 , 27 , 29 } ,
{ 4 , 5 , 11 , 18 , 22 , 33 } ,
{ 2 , 13 , 21 , 28 , 29 , 31 } ,
{ 7 , 11 , 15 , 19 , 20 , 24 } ,
{ 5 , 9 , 11 , 17 , 23 , 28 } ,
{ 1 , 5 , 10 , 17 , 18 , 29 } ,
{ 3 , 5 , 11 , 15 , 26 , 33 } ,
{ 3 , 9 , 16 , 20 , 22 , 33 } ,
{ 6 , 8 , 10 , 18 , 22 , 32 } ,
{ 6 , 12 , 15 , 22 , 29 , 32 } ,
{ 1 , 3 , 16 , 18 , 22 , 29 } ,
{ 4 , 6 , 7 , 16 , 19 , 20 } ,
{ 6 , 8 , 10 , 16 , 25 , 30 } ,
{ 3 , 4 , 19 , 21 , 27 , 28 } ,
{ 6 , 7 , 8 , 20 , 21 , 25 } ,
{ 1 , 7 , 12 , 14 , 18 , 25 } ,
{ 7 , 17 , 18 , 27 , 29 , 32 } ,
{ 3 , 6 , 7 , 23 , 30 , 33 } ,
{ 14 , 22 , 26 , 27 , 28 , 31 } ,
{ 1 , 12 , 13 , 16 , 23 , 28 } ,
{ 3 , 5 , 6 , 8 , 17 , 18 } ,
{ 3 , 5 , 7 , 13 , 14 , 18 } ,
{ 14 , 22 , 27 , 28 , 30 , 33 } ,
{ 5 , 7 , 13 , 15 , 18 , 30 } ,
{ 1 , 9 , 13 , 21 , 24 , 32 } ,
{ 7 , 8 , 12 , 15 , 22 , 26 } ,
{ 7 , 8 , 14 , 22 , 24 , 30 } ,
{ 2 , 8 , 13 , 14 , 25 , 33 } ,
{ 1 , 2 , 3 , 16 , 18 , 23 } ,
{ 1 , 3 , 7 , 14 , 26 , 28 } ,
{ 1 , 4 , 16 , 21 , 23 , 28 } ,
{ 2 , 8 , 10 , 12 , 30 , 33 } ,
{ 1 , 3 , 6 , 11 , 12 , 23 } ,
{ 11 , 28 , 29 , 30 , 32 , 33 } ,
{ 2 , 10 , 22 , 24 , 26 , 27 } ,
{ 5 , 6 , 14 , 22 , 24 , 26 } ,
{ 2 , 9 , 16 , 17 , 19 , 25 } ,
{ 1 , 2 , 18 , 29 , 31 , 32 } ,
{ 2 , 9 , 11 , 22 , 24 , 27 } ,
{ 7 , 16 , 26 , 27 , 29 , 31 } ,
{ 4 , 5 , 7 , 10 , 13 , 25 } ,
{ 2 , 4 , 5 , 8 , 19 , 22 } ,
{ 3 , 4 , 15 , 25 , 26 , 30 } ,
{ 1 , 3 , 6 , 12 , 16 , 32 } ,
{ 1 , 5 , 14 , 16 , 17 , 22 } ,
{ 3 , 6 , 10 , 16 , 25 , 31 } ,
{ 5 , 7 , 13 , 24 , 25 , 28 } ,
{ 8 , 18 , 21 , 28 , 29 , 33 } ,
{ 8 , 10 , 11 , 12 , 25 , 29 } ,
{ 6 , 11 , 13 , 22 , 25 , 32 } ,
{ 9 , 10 , 11 , 18 , 19 , 21 } ,
{ 6 , 13 , 14 , 28 , 29 , 30 },
{3,16,19,21,24,26},
{1,6,7,11,13,16},
{8,17,21,23,25,32},
{12,19,24,25,30,32},
{3,5,13,19,25,29},
{3,6,11,20,31,32},
{4,10,19,22,28,33}};
int o[100][6]={
{ 3 , 14 , 15 , 20 , 23 , 30 } ,
{ 8 , 9 , 18 , 20 , 25 , 29 } ,
{ 2 , 11 , 17 , 27 , 30 , 33 } ,
{ 1 , 2 , 5 , 10 , 19 , 24 } ,
{ 3 , 5 , 7 , 8 , 14 , 31 } ,
{ 6 , 11 , 17 , 20 , 23 , 24 } ,
{ 20 , 22 , 26 , 29 , 30 , 32 } ,
{ 2 , 8 , 10 , 16 , 27 , 30 } ,
{ 1 , 2 , 15 , 18 , 20 , 29 } ,
{ 7 , 8 , 20 , 23 , 28 , 29 } ,
{ 4 , 10 , 17 , 28 , 32 , 33 } ,
{ 5 , 6 , 7 , 14 , 25 , 28 } ,
{ 4 , 10 , 13 , 15 , 19 , 30 } ,
{ 2 , 4 , 7 , 14 , 15 , 25 } ,
{ 6 , 7 , 18 , 24 , 30 , 32 } ,
{ 4 , 12 , 20 , 25 , 28 , 29 } ,
{ 3 , 5 , 11 , 12 , 31 , 32 } ,
{ 2 , 9 , 13 , 15 , 19 , 24 } ,
{ 5 , 17 , 21 , 25 , 27 , 32 } ,
{ 5 , 9 , 15 , 21 , 26 , 31 } ,
{ 12 , 16 , 25 , 26 , 27 , 31 } ,
{ 6 , 7 , 10 , 12 , 15 , 21 } ,
{ 1 , 2 , 8 , 12 , 16 , 30 } ,
{ 2 , 4 , 6 , 10 , 25 , 30 } ,
{ 7 , 14 , 16 , 27 , 29 , 32 } ,
{ 9 , 13 , 20 , 22 , 25 , 28 } ,
{ 3 , 4 , 22 , 23 , 28 , 30 } ,
{ 6 , 7 , 8 , 22 , 26 , 27 } ,
{ 3 , 5 , 6 , 10 , 19 , 23 } ,
{ 2 , 11 , 12 , 14 , 15 , 16 } ,
{ 5 , 8 , 15 , 16 , 26 , 32 } ,
{ 6 , 7 , 16 , 17 , 24 , 25 } ,
{ 2 , 3 , 7 , 12 , 13 , 30 } ,
{ 16 , 23 , 25 , 26 , 32 , 33 } ,
{ 4 , 14 , 15 , 21 , 23 , 30 } ,
{ 5 , 9 , 13 , 18 , 20 , 32 } ,
{ 3 , 5 , 12 , 15 , 28 , 33 } ,
{ 1 , 3 , 14 , 19 , 30 , 33 } ,
{ 1 , 4 , 14 , 22 , 30 , 33 } ,
{ 8 , 12 , 14 , 15 , 17 , 21 } ,
{ 4 , 7 , 14 , 26 , 32 , 33 } ,
{ 1 , 5 , 15 , 17 , 27 , 29 } ,
{ 4 , 5 , 11 , 18 , 22 , 33 } ,
{ 2 , 13 , 21 , 28 , 29 , 31 } ,
{ 7 , 11 , 15 , 19 , 20 , 24 } ,
{ 5 , 9 , 11 , 17 , 23 , 28 } ,
{ 1 , 5 , 10 , 17 , 18 , 29 } ,
{ 3 , 5 , 11 , 15 , 26 , 33 } ,
{ 3 , 9 , 16 , 20 , 22 , 33 } ,
{ 6 , 8 , 10 , 18 , 22 , 32 } ,
{ 6 , 12 , 15 , 22 , 29 , 32 } ,
{ 1 , 3 , 16 , 18 , 22 , 29 } ,
{ 4 , 6 , 7 , 16 , 19 , 20 } ,
{ 6 , 8 , 10 , 16 , 25 , 30 } ,
{ 3 , 4 , 19 , 21 , 27 , 28 } ,
{ 6 , 7 , 8 , 20 , 21 , 25 } ,
{ 1 , 7 , 12 , 14 , 18 , 25 } ,
{ 7 , 17 , 18 , 27 , 29 , 32 } ,
{ 3 , 6 , 7 , 23 , 30 , 33 } ,
{ 14 , 22 , 26 , 27 , 28 , 31 } ,
{ 1 , 12 , 13 , 16 , 23 , 28 } ,
{ 3 , 5 , 6 , 8 , 17 , 18 } ,
{ 3 , 5 , 7 , 13 , 14 , 18 } ,
{ 14 , 22 , 27 , 28 , 30 , 33 } ,
{ 5 , 7 , 13 , 15 , 18 , 30 } ,
{ 1 , 9 , 13 , 21 , 24 , 32 } ,
{ 7 , 8 , 12 , 15 , 22 , 26 } ,
{ 7 , 8 , 14 , 22 , 24 , 30 } ,
{ 2 , 8 , 13 , 14 , 25 , 33 } ,
{ 1 , 2 , 3 , 16 , 18 , 23 } ,
{ 1 , 3 , 7 , 14 , 26 , 28 } ,
{ 1 , 4 , 16 , 21 , 23 , 28 } ,
{ 2 , 8 , 10 , 12 , 30 , 33 } ,
{ 1 , 3 , 6 , 11 , 12 , 23 } ,
{ 11 , 28 , 29 , 30 , 32 , 33 } ,
{ 2 , 10 , 22 , 24 , 26 , 27 } ,
{ 5 , 6 , 14 , 22 , 24 , 26 } ,
{ 2 , 9 , 16 , 17 , 19 , 25 } ,
{ 1 , 2 , 18 , 29 , 31 , 32 } ,
{ 2 , 9 , 11 , 22 , 24 , 27 } ,
{ 7 , 16 , 26 , 27 , 29 , 31 } ,
{ 4 , 5 , 7 , 10 , 13 , 25 } ,
{ 2 , 4 , 5 , 8 , 19 , 22 } ,
{ 3 , 4 , 15 , 25 , 26 , 30 } ,
{ 1 , 3 , 6 , 12 , 16 , 32 } ,
{ 1 , 5 , 14 , 16 , 17 , 22 } ,
{ 3 , 6 , 10 , 16 , 25 , 31 } ,
{ 5 , 7 , 13 , 24 , 25 , 28 } ,
{ 8 , 18 , 21 , 28 , 29 , 33 } ,
{ 8 , 10 , 11 , 12 , 25 , 29 } ,
{ 6 , 11 , 13 , 22 , 25 , 32 } ,
{ 9 , 10 , 11 , 18 , 19 , 21 } ,
{ 6 , 13 , 14 , 28 , 29 , 30 },
{3,16,19,21,24,26},
{1,6,7,11,13,16},
{8,17,21,23,25,32},
{12,19,24,25,30,32},
{3,5,13,19,25,29},
{3,6,11,20,31,32},
{4,10,19,22,28,33}};
int n[33][33]={{35,32,26,22,14,14,12,12,12,5,5,2,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{25,21,29,16,15,10,12,8,8,4,7,5,2,3,1,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{35,22,19,23,17,18,12,10,10,9,7,5,6,4,0,2,0,2,1,3,1,0,1,0,0,0,0,1,0,0,0,0,0},
{22,20,16,11,19,9,17,16,7,7,9,6,2,9,4,2,0,2,1,2,2,1,0,0,1,0,0,0,0,0,0,0,0},
{21,15,17,11,20,15,12,6,10,8,7,13,7,9,7,2,4,1,2,1,1,4,0,1,0,0,0,1,0,0,0,0,0},
{13,13,19,17,8,12,11,7,11,5,6,5,7,7,2,7,10,3,1,4,1,2,0,1,2,2,1,0,1,0,0,0,0},
{6,8,19,15,14,10,8,9,13,12,12,12,11,9,6,10,5,8,3,3,1,2,1,0,1,2,1,1,0,0,0,0,0},
{7,5,13,11,9,14,14,16,9,9,9,13,13,6,4,6,5,5,6,9,1,2,2,0,5,0,0,0,1,0,0,0,0},
{11,8,9,9,10,11,18,13,3,4,9,8,7,9,3,9,5,5,4,3,1,6,1,1,0,2,0,0,0,0,0,0,0},
{5,6,5,10,10,10,12,12,7,13,8,8,5,7,10,8,6,9,4,6,3,1,5,2,1,3,5,0,1,1,0,0,0},
{3,7,9,5,9,6,10,10,9,11,10,9,12,11,6,10,5,9,5,4,6,9,3,1,0,2,1,2,3,1,0,0,0},
{0,3,9,6,13,10,10,13,5,8,9,10,8,6,11,8,10,10,9,3,2,3,1,3,4,2,2,1,1,1,0,1,0},
{2,1,4,10,4,11,5,8,5,9,15,11,3,4,9,5,5,9,10,13,6,3,5,3,4,5,4,2,1,2,0,1,0},
{3,3,6,6,7,4,10,6,15,10,10,8,10,15,8,7,6,6,9,7,9,5,4,6,2,1,6,3,2,1,2,0,0},
{2,3,1,1,1,6,7,6,7,8,8,5,8,18,3,9,12,7,11,11,7,6,5,2,3,4,2,1,0,3,0,0,0},
{1,0,5,7,7,6,6,7,7,7,5,9,7,6,13,12,11,11,11,6,16,6,4,7,4,2,3,2,1,0,0,3,0},
{0,0,1,2,7,3,5,2,5,6,7,5,8,12,8,8,6,14,9,6,11,12,11,5,9,5,5,1,1,6,3,4,0},
{1,0,0,2,3,2,6,7,6,13,7,7,8,4,11,14,9,9,7,11,8,10,14,4,4,8,8,4,3,4,3,4,2},
{2, 1 ,0,0,3,1,3,8,4,2,8,6,5,8,9,11,9,6,6,11,6,7,9,10,10,5,5,4,6,4,5,1,1},
{0,2,0,0,2,2,6,1,6,7,8,5,12,8,7,6,6,13,9,6,11,12,7,6,3,9,9,8,8,10,6,4,1},
{0,0,1,0,1,3,1,4,6,7,7,6,4,9,7,8,7,16,5,7,13,5,8,11,6,12,4,5,5,9,3,5,4},
{0,0,0,1,2,0,1,5,0,6,3,4,9,10,6,4,15,8,9,12,8,12,9,8,6,7,8,6,9,6,7,3,5},
{0,0,0,0,0,1,0,1,1,3,4,3,5,4,6,6,10,4,6,13,7,11,7,3,11,10,12,14,3,12,4,3,5},
{0,0,1,0,0,0,0,0,2,1,3,2,5,6,3,7,4,4,9,4,4,6,10,7,8,7,14,12,10,6,8,8,2},
{0,0,0,0,0,0,1,0,0,1,1,6,3,3,4,6,4,11,7,5,12,13,2,8,14,10,12,10,8,10,9,11,5},
{0,0,0,0,0,0,3,2,1,2,0,3,4,2,4,5,6,8,7,9,12,12,14,10,16,9,12,8,11,12,12,12,4},
{0,0,0,0,0,0,0,4,0,4,1,2,3,3,5,4,6,9,3,7,5,10,19,10,4,13,8,13,7,16,7,15,6},
{0,0,0,0,0,1,0,0,0,1,1,1,2,1,6,4,3,6,8,5,5,2,6,4,9,15,12,10,12,13,17,17,15},
{0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,5,7,1,6,8,8,8,4,6,11,8,9,13,20,15,9,18,18},
{0,0,0,0,0,0,0,1,0,0,1,1,0,1,1,1,5,4,3,11,5,6,4,10,10,19,15,17,17,15,21,27,22},
{0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,2,2,2,3,5,8,4,4,12,10,10,10,16,8,19,15,15,25},
{0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,2,1,2,5,7,5,6,5,8,18,12,10,20,33,22,29,21},
{0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,2,4,3,7,10,9,4,10,19,18,20,27,26}};
FILE *fd=NULL;
fopen_s(&fd,"C:\\ssq.txt", "w");
for(i=0;i<100;i++)
{
printf("第 %d 期\n",i);
fprintf(fd,"第 %d 期\n",i);
for(j=0;j<6;j++)
{
s=m[i][j];
printf("%d后面个数:",s);
fprintf(fd,"%d后面个数:",s);
a=m[i][j];
x=a-1;
z=m[i+1][j];
for(f=0;f<6;f++)
{
y=o[i+1][f]-1;
k=n[x][y];
if(j==0)
{
if(y==0) a1=k;
if(y==1) a2=k;
if(y==2) a3=k;
if(y==3) a4=k;
if(y==4) a5=k;
if(y==5) a6=k;
}
if(j==1)
{
if(y==0) b1=k;
if(y==1) b2=k;
if(y==2) b3=k;
if(y==3) b4=k;
if(y==4) b5=k;
if(y==5) b6=k;
}
if(j==2)
{
if(y==0) c1=k;
if(y==1) c2=k;
if(y==2) c3=k;
if(y==3) c4=k;
if(y==4) c5=k;
if(y==5) c6=k;
}
if(j==3)
{
if(y==0) d1=k;
if(y==1) d2=k;
if(y==2) d3=k;
if(y==3) d4=k;
if(y==4) d5=k;
if(y==5) d6=k;
}
if(j==4)
{
if(y==0) e1=k;
if(y==1) e2=k;
if(y==2) e3=k;
if(y==3) e4=k;
if(y==4) e5=k;
if(y==5) e6=k;
}
if(j==5)
{
if(y==0) f1=k;
if(y==1) f2=k;
if(y==2) f3=k;
if(y==3) f4=k;
if(y==4) f5=k;
if(y==5) f6=k;
}
if(a1==0) x1=x1+1;
if(b1==0) x1=x1+1;
if(c1==0) x1=x1+1;
if(d1==0) x1=x1+1;
if(e1==0) x1=x1+1;
if(f1==0) x1=x1+1;
if(a2==0) x2=x2+1;
if(b2==0) x2=x2+1;
if(c2==0) x2=x2+1;
if(d2==0) x2=x2+1;
if(e2==0) x2=x2+1;
if(f2==0) f2=x2+1;
if(a3==0) x3=x3+1;
if(b3==0) x3=x3+1;
if(c3==0) x3=x3+1;
if(d3==0) x3=x3+1;
if(e3==0) x3=x3+1;
if(f3==0) x3=x3+1;
if(a4==0) x4=x4+1;
if(b4==0) x4=x4+1;
if(c4==0) x4=x4+1;
if(d4==0) x4=x4+1;
if(e4==0) x4=x4+1;
if(f4==0) x4=x4+1;
if(a5==0) x5=x5+1;
if(b5==0) x5=x5+1;
if(c5==0) x5=x5+1;
if(d5==0) x5=x5+1;
if(e5==0) x5=x5+1;
if(f5==0) x5=x5+1;
if(a6==0) x6=x6+1;
if(b6==0) x6=x6+1;
if(c6==0) x6=x6+1;
if(d6==0) x6=x6+1;
if(e6==0) x6=x6+1;
if(f6==0) x6=x6+1;
if(x1==4||x2==4||x3==4||x4==4||x5==4||x6==4)
{
printf("%d,",z);
fprintf(fd,"%d,",z);
}
x1=0;x2=0;x3=0;x4=0;x5=0;x6=0;
}
printf("\n");
fprintf(fd,"\n");
}
printf("\n____________________________________________________\n");
fprintf(fd,"\n___________________________________________________\n");
}
return 0;
}
[ 本帖最后由 zjc201003 于 2010-4-21 20:19 编辑 ]