Home > Back-end >  Linked list implementation
Linked list implementation

Time:10-19

 

#include
#include
using namespace std;
Int main ()
{
__int64 t, n, I, STR [55] [26], j.
Char ch1 [1000], ch2 [1000].
cin> t;
While (t -)
{
Memset (STR, 0, sizeof (STR));
cin> Ch1 & gt;> Ch2 & gt;> n;
//coutfor(i=0; Ch1 [I]!='\ 0'; I++)
{
STR [0] [ch1 [I] - 'a'] + +;//STR [n] [0] on behalf of a number of characters in a string of n
}


for(i=0; Ch2 [I]!='\ 0'; I++)
STR [1] [ch2 [I] - 'a'] + +;

For (I=2; i<=n; I++)
for(j=0; J<26. J++)
STR [I] [j]=STR [j] + [I - 1] STR [I - 2] [j];

for(j=0; J<26. J++)
cout<(char) (' a '+ j) & lt; <':' & lt; cout}
}
  • Related