{"problem":{"name":"Match or Not","description":{"content":"You are given strings $S$ and $T$ consisting of lowercase English letters and `?`. Here, $|S| \\gt |T|$ holds (for a string $X$, $|X|$ denotes the length of $X$). Two strings $X$ and $Y$ such that $|X|","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc287_d"},"statements":[{"statement_type":"Markdown","content":"You are given strings $S$ and $T$ consisting of lowercase English letters and `?`. Here, $|S| \\gt |T|$ holds (for a string $X$, $|X|$ denotes the length of $X$).\nTwo strings $X$ and $Y$ such that $|X|=|Y|$ is said to **match** if and only if:\n\n*   one can make $X$ equal $Y$ by replacing each `?` in $X$ and $Y$ with any English letter independently.\n\nSolve the following problem for each $x=0,1,\\ldots,|T|$:\n\n*   Let $S'$ be the string of length $|T|$ obtained by concatenating the first $x$ characters and the last $(|T|-x)$ characters of $S$ without changing the order. Print `Yes` if $S'$ and $T$ match, and `No` otherwise.\n\n## Constraints\n\n*   $S$ and $T$ are strings consisting of lowercase English letters and `?`.\n*   $1 \\leq |T| \\lt |S| \\leq 3 \\times 10^5$\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$S$\n$T$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc287_d","tags":[],"sample_group":[["a?c\nb?","Yes\nNo\nNo\n\nWhen $x=0$, $S'$ equals `?c`. Here, we can replace the $1$\\-st character of $S'$, `?`, with `b` and the $2$\\-nd character of $T$, `?`, with `c` to make $S'$ equal $T$, so $S'$ and $T$ match. Thus, `Yes` should be printed in the first line.  \nWhen $x=1$ and $2$, respectively, $S'$ is `ac` and `a?`, neither of which matches with $T$. Thus, `No` should be printed in the second and third lines."],["atcoder\n?????","Yes\nYes\nYes\nYes\nYes\nYes"],["beginner\ncontest","No\nNo\nNo\nNo\nNo\nNo\nNo\nNo"]],"created_at":"2026-03-03 11:01:14"}}