#include<stdio.h> #define TABLE_LEN 5 const int table[10][TABLE_LEN]= {{},{1,2,4,5},{1,2,3},{2,3,5,6}, {1,4,7},{2,4,5,6,8},{3,6,9}, {4,5,7,8},{7,8,9},{5,6,8,9}}; int state[10]; int times[10],min=0x7FFFFFFF,ans_times[10]; bool isFirst=true; void deal…