{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"有一种表达式,p, q, r, s, t 都是公式里的变量,K, A, N, C, E 是运算符。分别代表 and, or, not, implies, equal 运算。运算对照表如下。\n\n\u003ccenter\u003e\u003ctable cols\u003d\"1\"width\u003d\"80%\"border\u003d\"1\"id\u003d\"table1\"\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u003ccenter\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"color\u003d\"#000099\"\u003eDefinitions of K,A,N,C,and E\u003c/font\u003e\u003c/b\u003e\u003c/center\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\u003ctable cols\u003d\"6\"width\u003d\"80%\"border\u003d\"1\"id\u003d\"table2\"\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u003ci\u003ew\u003c/i\u003e\u0026nbsp;\u003ci\u003ex\u003c/i\u003e\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;K\u003ci\u003ewx\u003c/i\u003e\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;A\u003ci\u003ewx\u003c/i\u003e\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;\u0026nbsp;N\u003ci\u003ew\u003c/i\u003e\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;C\u003ci\u003ewx\u003c/i\u003e\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;E\u003ci\u003ewx\u003c/i\u003e\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;1\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;\u0026nbsp;0\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;1\u0026nbsp;0\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;0\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;\u0026nbsp;0\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;0\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;0\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;0\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;0\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;0\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;0\u0026nbsp;0\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;0\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;0\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003ctd\u003e\u003cb\u003e\u003cfont size\u003d\"+1\"face\u003d\"Courier New,Courier\"\u003e\u0026nbsp;1\u003c/font\u003e\u003c/b\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\u003c/center\u003e\n\n - 如果 w 是公式,则 Nw 也是公式\n - 如果 w, x 是公式,则 Kwx, Awx, Cwx, Ewx 也是公式。\n - 如果一个公式的逻辑值恒为 1,这称这个公式为 tautology。\n\n现在给你一个公式,请你判断它是不是 tautology.\n"}},{"title":"Input","value":{"format":"MD","content":"输入由几个测试用例组成。 每个测试用例是一行包含不超过 100 个符号的公式。 包含 0 的行跟在最后一种情况之后。"}},{"title":"Output","value":{"format":"MD","content":"对于每个测试用例,输出 \u003ci\u003etautology\u003c/i\u003e 或 \u003ci\u003enot\u003c/i\u003e。"}},{"title":"Sample","value":{"format":"MD","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\u003eApNp\nApNq\n0\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003etautology\nnot\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}