{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003e菲波先生是一所小学的数学老师。在下一堂课中,他计划教孩子们如何相加。在课前,他将准备$N$张带有数字的卡片。第$i$张卡片上的数字是$a_i$。在课堂上,每轮他会移走不超过$3$张卡片,并让学生选择任意十张卡片,这些卡片上的数字之和为$87$。每轮结束后,被移走的卡片将被放回原位。现在,他想知道每轮是否至少有一个解决方案。你能帮助他吗?\u003c/div\u003e"}},{"title":"输入","value":{"format":"HTML","content":"输入的第一行包含一个整数$t~(t \\le 5)$,表示测试用例的数量。接下来有$t$个测试用例。\u003cbr\u003e对于每个测试用例,第一行包含一个整数$N(N \\leq 50)$。\u003cbr\u003e第二行包含$N$个非负整数$a_1, a_2, ... , a_N$。第$i$个数字表示第$i$张卡片上的数字。第三行包含一个整数$Q(Q \\leq 100000)$。接下来的$Q$行每行包含三个整数$i,j,k$,表示菲波先生将在这一轮中移走第$i$、第$j$和第$k$张卡片。当$i\u003dj$、$i\u003dk$或$j\u003dk$时,问题可能会退化。"}},{"title":"输出","value":{"format":"HTML","content":"对于每个测试用例的每一轮,如果至少存在一个解决方案,则输出\u0027Yes\u0027,否则输出\u0027No\u0027。"}},{"title":"示例","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\u003e1\r\n12\r\n1 2 3 4 5 6 7 8 9 42 21 22\r\n10\r\n1 2 3\r\n3 4 5\r\n2 3 2\r\n10 10 10\r\n10 11 11\r\n10 1 1\r\n1 2 10\r\n1 11 12\r\n1 10 10\r\n11 11 12\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eNo\r\nNo\r\nNo\r\nYes\r\nNo\r\nYes\r\nNo\r\nNo\r\nYes\r\nYes\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}}]}