{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eDima adds letters \u003ci\u003es\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e, …, \u003ci\u003es\u003c/i\u003e\u003csub\u003e\u003ci\u003en\u003c/i\u003e\u003c/sub\u003e one by one to the end of a word. After each letter, he asks Misha to tell him how many new palindrome substrings appeared\r\nwhen he added that letter.\r\nTwo substrings are considered distinct if they are different as strings.\r\nWhich \u003ci\u003en\u003c/i\u003e numbers will be said by Misha if it is known that he is never wrong?\u003c/div\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eThe input contains a string \u003ci\u003es\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e … \u003ci\u003es\u003c/i\u003e\u003csub\u003e\u003ci\u003en\u003c/i\u003e\u003c/sub\u003e consisting of letters ‘a’ and ‘b’ (1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 5\u0026nbsp;000\u0026nbsp;000).\u003c/div\u003e\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003ePrint \u003ci\u003en\u003c/i\u003e numbers without spaces: \u003ci\u003ei\u003c/i\u003e-th number must be the number of palindrome substrings of the prefix \u003ci\u003es\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e … \u003ci\u003es\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e\u003c/sub\u003e minus the number of palindrome\r\nsubstrings of the prefix \u003ci\u003es\u003c/i\u003e\u003csub\u003e1\u003c/sub\u003e … \u003ci\u003es\u003c/i\u003e\u003csub\u003e\u003ci\u003ei\u003c/i\u003e−1\u003c/sub\u003e.\r\nThe first number in the output should be one.\r\n \u003c/div\u003e\u003c/div\u003e"}},{"title":"Sample","value":{"format":"HTML","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\u003eabbbba\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e111111\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Notes","value":{"format":"HTML","content":"\u003cdiv class\u003d\"problem_par\"\u003e\u003cdiv class\u003d\"problem_par_normal\"\u003eWe guarantee that jury has C++ solution which fits Time Limit at least two times. We do not guarantee that solution on other languages exists (even Java).\u003c/div\u003e\u003c/div\u003e"}}]}