# Include <iostream> using namespace STD; string DIC [10010]; string CHE [60]; int DC, CC, flag; void setfile () // enter {Dc = Cc = 0; do {DC ++; CIN> DIC [DC];} while (DC <= 10000 & DIC [DC] [0]! = '#'); Do {CC ++; CIN> CHE [CC] ;}while (CC <= 50 & CHE [CC] [0]! = '#');} Void modify (int n) {string res [500], tempstr; int I, j, T, CNT = 0; for (I = 1; I <DC; I ++) {T = CHE [N]. size ()-DIC [I]. size (); If (t = 1) // when the word to be queried is 1 longer than the word in the dictionary, insert a letter into the dictionary to compare it. {For (j = 0; j <CHE [N]. Size (); j ++) {If (CHE [N] [J]! = DIC [I] [J]) {tempstr = DIC [I]; tempstr. insert (J, 1, CHE [N] [J]); If (tempstr = CHE [N]) RES [++ CNT] = DIC [I]; elsebreak ;}}}if (t =-1) // when the word to be queried is 1 shorter than the word in the dictionary, insert a letter into the word to be queried to compare with the word in the dictionary. {For (j = 0; j <DIC [I]. Size (); j ++) {If (CHE [N] [J]! = DIC [I] [J]) {tempstr = CHE [N]; tempstr. insert (J, 1, DIC [I] [J]); If (tempstr = DIC [I]) RES [++ CNT] = tempstr; elsebreak ;}}} if (t = 0) // when the word to be queried is the same as the word in the dictionary, replace a letter for comparison. {For (j = 0; j <CHE [N]. Size (); j ++) {If (CHE [N] [J]! = DIC [I] [J]) {tempstr = CHE [N]; tempstr. replace (J, 1, DIC [I], J, 1); If (tempstr = DIC [I]) RES [++ CNT] = tempstr; elsebreak ;}}}for (I = 1; I <= CNT; I ++) cout <''<res [I]; cout <Endl ;} void check () {int I, j; flag = false; for (I = 1; I <cc; I ++) {for (j = 1; j <DC; j ++) {If (CHE [I] = DIC [J]) {flag = true; break ;}} if (FLAG) cout <CHE [I] <''<" is correct "<Endl; else {cout <CHE [I] <":"; modify (I);} flag = false;} int main () {setfile (); check (); Return 0 ;}