{"problem":{"name":"Palindrome Query","description":{"content":"You are given a string $S$ of length $N$ consisting of lowercase English letters.   Process $Q$ queries described below in the order they are given.   There are two types of queries: *   `1 x c` : Ch","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":3000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc331_f"},"statements":[{"statement_type":"Markdown","content":"You are given a string $S$ of length $N$ consisting of lowercase English letters.  \nProcess $Q$ queries described below in the order they are given.  \nThere are two types of queries:\n\n*   `1 x c` : Change the $x$\\-th character of $S$ to the lowercase English letter $c$.\n*   `2 L R` : If the substring formed by the $L$\\-th through $R$\\-th characters of $S$ is a palindrome, print `Yes`; otherwise, print `No`.\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^6$\n*   $1 \\leq Q \\leq 10^5$\n*   $S$ is a string of length $N$ consisting of lowercase English letters.\n*   $1 \\leq x \\leq N$\n*   $c$ is a lowercase English letter.\n*   $1 \\leq L \\leq R \\leq N$\n*   $N, Q, x, L, R$ are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format. Here, $\\text{query}_i$ is the $i$\\-th query to be processed.\n\n$N$ $Q$\n$S$\n$\\text{query}_1$\n$\\text{query}_2$\n$\\vdots$\n$\\text{query}_Q$\n\nEach query is given in one of the following formats:\n\n$1$ $x$ $c$\n\n$2$ $L$ $R$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc331_f","tags":[],"sample_group":[["7 8\nabcbacb\n2 1 5\n2 4 7\n2 2 2\n1 5 c\n2 1 5\n2 4 7\n1 4 c\n2 3 6","Yes\nNo\nYes\nNo\nYes\nYes\n\nInitially, $S =$ `abcbacb`.  \nFor the first query, the string formed by the $1$\\-st through $5$\\-th characters of $S$ is `abcba`, which is a palindrome. Thus, print `Yes`.  \nFor the second query, the string formed by the $4$\\-th through $7$\\-th character of $S$ is `bacb`, which is not a palindrome. Thus, print `No`.  \nFor the third query, the string formed by the $2$\\-nd through $2$\\-nd character of $S$ is `b`, which is a palindrome. Thus, output `Yes`.  \nFor the fourth query, change the $5$\\-th character of $S$ to `c`. $S$ becomes `abcbccb`.  \nFor the fifth query, the string formed by the $1$\\-st through $5$\\-th character of $S$ is `abcbc`, which is not a palindrome. Thus, output `No`.  \nFor the sixth query, the string formed by the $4$\\-th through $7$\\-th character of $S$ is `bccb`, which is a palindrome. Thus, output `Yes`.  \nFor the seventh query, change the $4$\\-th character of $S$ to `c`. $S$ becomes `abccccb`.  \nFor the eighth query, the string formed by the $3$\\-rd through $6$\\-th character of `cccc`, which is a palindrome. Thus, output `Yes`."]],"created_at":"2026-03-03 11:01:14"}}