{"trustable":true,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n #problem-body \u003e pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv id\u003d\"problem-body\"\u003e\n\t\u003cp\u003eIt\u0027s English class now. So John is bored as usual. To get over his boredom he is doing a very strange thing. He writes an arbitrary string on his notebook and then keeps changing a single character of the string every time and tries to find out if the string has become a palindrome.\u003c/p\u003e\r\n\u003cp\u003eAs John is very smart this task is very simple for him.\u003c/p\u003e\r\n\u003cp\u003eBut how simple is it for you? Can you be as smart as the great John?\u003c/p\u003e\r\n\u003cp\u003eYou\u0027ll have to write a code that solves the similar problem and hopefully, as fast as John.\u003c/p\u003e\r\n\r\n\u003ch3\u003eInput\u003c/h3\u003e\r\n\u003cp\u003eFirst line of the input will be an integer T (T \u0026lt;\u003d 15) denoting number of test cases.\u003c/p\u003e\r\n\u003cp\u003eEach test case starts with an integer N (1 \u0026lt;\u003d N \u0026lt;\u003d 100000) denoting the length of the string.\u003c/p\u003e\r\n\u003cp\u003eNext line will contain the string consisting of only small letters of English alphabet (a, b, c, ... x, y, z).\u003c/p\u003e\r\n\u003cp\u003eThen there will be another integer M (1 \u0026lt;\u003d M \u0026lt;\u003d 10000) denoting number of queries.\u003c/p\u003e\r\n\u003cp\u003eEach query will be in the form: i x, where i will be an integer (1 \u0026lt;\u003d i \u0026lt;\u003d N) and x will be a character, (a \u0026lt;\u003d x \u0026lt;\u003d z) and it will mean that the i-th character of the string has been changed to x.\u003c/p\u003e\r\n\r\n\u003ch3\u003eOutput\u003c/h3\u003e\r\n\u003cp\u003eFirst you will have to print the test case number.\u003c/p\u003e\r\n\u003cp\u003eThen for each query in the test case you will have to print \"YES\" if the given string has become a palindrome. Otherwise print \"NO\" (without the quotes.)\u003c/p\u003e\r\n\u003cp\u003eSee sample input/output and explanation for details.\u003c/p\u003e\r\n\r\n\u003ch3\u003eSample\u003c/h3\u003e\r\n\u003cpre\u003e\r\n\u003cstrong\u003eInput\u003c/strong\u003e\r\n1\r\n11\r\nmadamimadam\r\n6\r\n6 z\r\n1 a\r\n11 b\r\n5 z\r\n1 b\r\n7 z\r\n\r\n\u003cstrong\u003eInput\u003c/strong\u003e\r\nCase 1:\r\nYES\r\nNO\r\nNO\r\nNO\r\nNO\r\nYES\r\n\u003c/pre\u003e\r\n\u003ch3\u003eExplanation:\u003c/h3\u003e\r\n\u003cp\u003eAfter the 1st query the string is: madamzmadam, which is a palindrome\u003c/p\u003e\r\n\u003cp\u003eAfter the 2nd query the string is: aadamzmadam, which is \u003cstrong\u003eNOT\u003c/strong\u003e a palindrome\u003c/p\u003e\r\n\u003cp\u003eAfter the 3rd query the string is: aadamzmadab, which is \u003cstrong\u003e NOT\u003c/strong\u003e a palindrome\u003c/p\u003e\r\n\u003cp\u003eAfter the 4th query the string is: aadazzmadab, which is \u003cstrong\u003eNOT\u003c/strong\u003e a palindrome\u003c/p\u003e\r\n\u003cp\u003eAfter the 5th query the string is: badazzmadab, which is \u003cstrong\u003eNOT\u003c/strong\u003e a palindrome\u003c/p\u003e\r\n\u003cp\u003eAfter the 6th query the string is: badazzzadab, which is a palindrome\u003c/p\u003e\r\n\n\u003c/div\u003e"}}]}