#include
/ * void setm (int A [】 [], int m, int N) {INT I, J; for (i = 0; i } int mini (int * b) {INT i = 0; INT N, M, FLAG; N = 0; While (B [i]> = 0 && B [i] <= 9) {n ; i ;} m = B [0]; FLAG = 0; for (j = 1; j Void main () {int N; CHAR SEQUENCE [255]; cout << "Please enter the number of tops:"; cin >> n; cout << "Please enter the access sequence:"; cin >> sequence; cout << "***** All right reserved by hero *****" << Endl; Martrix = new int * [n]; for (i = 0; i Current = new char [n]; for (i = 0; i You can use the example of the case to test this little thing! The example is: the number of page racks is: 4; access sequence is: 0123010321; Executive result is: Please enter the number of collections: 4 Please enter access Sequence: 0123010321 ***** All right reserved by hero ** 0 requires entry 0 1 1 1 ** 00 0 0 0 ** 0 0 0 0 ** 0 0 0 0 ** 缺 1 Requirements to enter 0 0 1 1 ** 01 0 1 1 ** 10 0 0 ** 0 0 0 0 ** Limited 2 Request to enter 0 0 0 1 ** 01 0 0 1 ** 11 1 0 1 ** 20 0 0 0 ** Laid 3 Requirements to enter 0 0 0 0 ** 01 0 0 0 ** 11 1 0 0 ** 21 1 1 0 ** 3 Missions 0 Requirements to enter 0 1 1 1 1 ** 00 0 0 0 ** 10 1 0 0 ** 20 1 1 0 ** 3 1 Request to enter 0 0 1 1 ** 01 0 1 1 ** 10 0 0 ** 20 0 1 0 ** 3 0 Requirements to enter 0 1 1 1 1 ** 00 0 1 1 ** 10 0 0 0 ** 20 0 1 0 ** 3 3 Request to enter 0 1 1 0 ** 00 0 1 0 ** 10 0 0 0 ** 21 1 1 0 ** 3 2 Request to enter 0 1 0 0 ** 00 0 0 ** 11 1 0 1 ** 21 1 0 0 ** 3 1 Requires to enter 0 0 0 0 ** 01 0 1 1 ** 11 0 0 1 ** 21 0 0 0 ** 3 There are 4 missions, please press any key and return to return. This answer to the class is the same! Other examples will try it, such as this homework: The number of pages is: 4; access sequence is: Abcdabeabcde You can get the result. Please enter the number of tops: 4 Please enter the access sequence: abcdabeabcde ***** All Right Reserved by Hero A requirement to enter 0 1 1 1 1 ** A0 0 0 0 ** 0 0 0 0 ** 0 0 0 0 ** Lackage B Requirement 0 0 1 1 ** A1 0 1 1 ** B0 0 0 ** 0 0 0 0 ** 缺 C required to enter 0 0 0 1 ** A1 0 0 1 ** B1 1 0 1 ** C0 0 0 0 ** 缺 D requirements enter 0 0 0 ** A1 0 0 ** B1 1 0 0 ** C1 1 1 0 ** D Location A required to enter 0 1 1 1 ** A0 0 0 0 ** B0 1 0 0 ** C0 1 1 0 ** D B Requirements Enter 0 0 1 1 ** A1 0 1 1 ** B0 0 0 0 * C0 0 1 0 ** D E required to enter 0 0 0 1 ** A1 0 0 1 ** B1 1 0 1 ** E0 0 0 ** D Launch, replacement of the previous C A required to enter 0 1 1 1 ** A0 0 0 1 ** B0 1 0 1 ** E0 0 0 0 ** D B Request 0 0 1 1 ** A1 0 1 1 ** B0 0 0 1 ** E0 0 0 0 ** D C required to enter 0 0 1 0 ** A1 0 1 0 ** B0 0 0 0 ** E1 1 1 0 ** C Lack, replacement of the previous D D Requirements to enter 0 0 0 0 ** A1 0 0 ** B1 1 0 1 ** D1 1 0 0 ** C Lack, replacement of the previous E of E E required to enter 0 1 1 1 ** E0 0 0 ** B0 1 0 1 ** D0 1 0 * * C MLT, the line of the previous A There are 8 missions in total, please press any key and return to return.