{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"\u003ch3\u003e Read problems statements in \u003ca target\u003d\"_blank\" href\u003d\"https://www.codechef.com/download/translated/LTIME25/mandarin/CHEFSTLT.pdf\" rel\u003d\"nofollow noreferrer noopener\"\u003eMandarin Chinese \u003c/a\u003e and \u003ca target\u003d\"_blank\" href\u003d\"https://www.codechef.com/download/translated/LTIME25/russian/CHEFSTLT.pdf\" rel\u003d\"nofollow noreferrer noopener\"\u003eRussian\u003c/a\u003e.\u003c/h3\u003e\n\n\n\u003cp\u003eChef has found two very old sheets of paper, each of which originally contained a string of lowercase Latin letters. The strings on both the sheets have equal lengths. However, since the sheets are very old, some letters have become unreadable.\u003c/p\u003e\n\n\u003cp\u003eChef would like to estimate the \u003ci\u003edifference\u003c/i\u003e between these strings. Let\u0027s assume that the first string is named \u003cb\u003eS1\u003c/b\u003e, and the second \u003cb\u003eS2\u003c/b\u003e. The unreadable symbols are specified with the question mark symbol \u003ctt\u003e\u0027?\u0027\u003c/tt\u003e. The \u003ci\u003edifference\u003c/i\u003e between the strings equals to the number of positions \u003cb\u003ei\u003c/b\u003e, such that \u003cb\u003eS1\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e is not equal to \u003cb\u003eS2\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e, where \u003cb\u003eS1\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e and \u003cb\u003eS2\u003csub\u003ei\u003c/sub\u003e\u003c/b\u003e denote the symbol at the \u003cb\u003ei\u003c/b\u003e the position in \u003cb\u003eS1\u003c/b\u003e and \u003cb\u003eS2\u003c/b\u003e, respectively.\u003c/p\u003e\n\n\u003cp\u003eChef would like to know the minimal and the maximal difference between the two strings, if he changes all unreadable symbols to lowercase Latin letters. Now that you\u0027re fully aware of Chef\u0027s programming expertise, you might have guessed that he needs you help solving this problem as well. Go on, help him!\u003c/p\u003e\n\n\u003ch3\u003eInput\u003c/h3\u003e\n\u003cp\u003eThe first line of the input contains an integer \u003cb\u003eT\u003c/b\u003e denoting the number of test cases. The description of \u003cb\u003eT\u003c/b\u003e test cases follows.\u003c/p\u003e\n\n\u003cp\u003eThe first line of a test case contains a string \u003cb\u003eS1\u003c/b\u003e.\u003c/p\u003e \n\n\u003cp\u003eThe second line of a test case contains a string \u003cb\u003eS2\u003c/b\u003e. \u003c/p\u003e\n\n\u003cp\u003eBoth strings consist of lowercase Latin letters and question marks in places where the symbols are unreadable.\u003c/p\u003e\n\n\u003ch3\u003eOutput\u003c/h3\u003e\n\u003cp\u003eFor each test case, output the minimal and the maximal difference between two given strings separated with a single space.\u003c/p\u003e\n\n\u003ch3\u003eConstraints\u003c/h3\u003e\n\u003cp\u003e\u003c/p\u003e\u003cul\u003e\u003cli\u003e\u003cb\u003e1\u003c/b\u003e ≤ \u003cb\u003eT\u003c/b\u003e ≤ \u003cb\u003e100\u003c/b\u003e\u003c/li\u003e\n\u003cli\u003e\u003cb\u003e1\u003c/b\u003e ≤ \u003cb\u003e|S1|, |S2|\u003c/b\u003e ≤ \u003cb\u003e100\u003c/b\u003e\u003c/li\u003e\n\u003cli\u003eSubtask 1 (25 points): \u003cb\u003e|S1| \u003d 1\u003c/b\u003e\u003c/li\u003e\n\u003cli\u003eSubtask 2 (10 points): neither \u003cb\u003eS1\u003c/b\u003e nor \u003cb\u003eS2\u003c/b\u003e contains unreadable symbols\u003c/li\u003e\n\u003cli\u003eSubtask 3 (65 points): \u003cb\u003e1\u003c/b\u003e ≤ \u003cb\u003e|S1|, |S2|\u003c/b\u003e ≤ \u003cb\u003e100\u003c/b\u003e\u003c/li\u003e\n\u003c/ul\u003e"}},{"title":"Sample 1","value":{"format":"MD","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\na?c\n??b\n???a\n???a\n?abac\naba?w\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 3\n0 3\n3 5\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003e\u003cb\u003eExample case 1\u003c/b\u003e. You can change the question marks in the strings so that you obtain \u003cb\u003eS1\u003c/b\u003e \u003d \u003ctt\u003eabc\u003c/tt\u003e and \u003cb\u003eS2\u003c/b\u003e \u003d \u003ctt\u003eabb\u003c/tt\u003e. Then \u003cb\u003eS1\u003c/b\u003e and \u003cb\u003eS2\u003c/b\u003e will differ in one position. On the other hand, you can change the letters so that \u003cb\u003eS1\u003c/b\u003e \u003d \u003ctt\u003eabc\u003c/tt\u003e and \u003cb\u003eS2\u003c/b\u003e \u003d \u003ctt\u003ebab\u003c/tt\u003e. Then, the strings will differ in all three positions.\u003c/p\u003e\n\u003cp\u003e\u003cb\u003eExample case 2\u003c/b\u003e. Change the question marks this way: \u003cb\u003eS1\u003c/b\u003e \u003d \u003ctt\u003edcba\u003c/tt\u003e, \u003cb\u003eS2\u003c/b\u003e \u003d \u003ctt\u003edcba\u003c/tt\u003e, then the strings will differ in \u003cb\u003e0\u003c/b\u003e positions. You can also change the question marks so that \u003cb\u003eS1\u003c/b\u003e \u003d \u003ctt\u003eaaaa\u003c/tt\u003e, \u003cb\u003eS2\u003c/b\u003e \u003d \u003ctt\u003edcba\u003c/tt\u003e, then the strings will differ in \u003cb\u003e3\u003c/b\u003e positions.\u003c/p\u003e\n\u003cp\u003e\u003cb\u003eExample case 3\u003c/b\u003e. Change the question marks this way: \u003cb\u003eS1\u003c/b\u003e \u003d \u003ctt\u003eaabac\u003c/tt\u003e, \u003cb\u003eS2\u003c/b\u003e \u003d \u003ctt\u003eabaaw\u003c/tt\u003e, then the strings will differ in \u003cb\u003e3\u003c/b\u003e positions. Then, change the question marks this way: \u003cb\u003eS1\u003c/b\u003e \u003d \u003ctt\u003exabac\u003c/tt\u003e, \u003cb\u003eS2\u003c/b\u003e \u003d \u003ctt\u003eabayw\u003c/tt\u003e, then they will differ in \u003cb\u003e5\u003c/b\u003e positions.\u003c/p\u003e"}}]}