Home > Back-end >  Could you tell me how to write in c
Could you tell me how to write in c

Time:10-11

Could you tell me how to write in c

Read from standard input two character set (does not contain Spaces, tabs, carriage returns, such as white space characters), the characters in a character set disorder, and there may be repeated characters, characters are exactly the same as the two character sets (characters are the same, if repeat, repeat the same number, the order is not necessarily the same), the two character set is the same, write a program to judge the input of the two character sets are the same: use 1 is the same, with 0 means different,
[form] input
Respectively on two lines enter two character set (each number no more than 20 characters in a character set, and also have a carriage returns after the second character input),
[] output form
If two character set is the same, the output 1, otherwise 0, then the branch output in accordance with the order of the growing up of the first character in a character set and the number of repeat (in a space-delimited),
[1] sample input
Helloworld9
Worldhello9
[1] sample output
1
9 1
D 1
E 1
H 1
L 3
O 2
R 1
W 1
[sample input 2]
The helloworld
Heloworld
[2] sample output
0
D 1
E 1
H 1
L 3
O 2
R 1
1 w
  • Related