{"trustable":false,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e给定一张由n个点和m条边构成的非加权无向图。图没有自环和重边\u003c/p\u003e\n\u003cp\u003e现在你想给图上每个顶点的权重赋值为{1,2,3}中的一个值,使得所有边相连的两个点的权重之和为奇数。\u003c/p\u003e\n\u003cp\u003e问共有多少种方法,将答案取模998244353。\u003c/p\u003e\n"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003e第一行包含一个T(1\u0026lt;\u003dT\u0026lt;\u003d3*10\u003csup\u003e5\u003c/sup\u003e),表示测试样例组数。\u003c/p\u003e\n\u003cp\u003e每组测试样例第一行为整数n和m(1\u0026lt;\u003dn\u0026lt;\u003d3 * 10\u003csup\u003e5\u003c/sup\u003e; 0\u0026lt;\u003dm\u0026lt;\u003d3 * 10\u003csup\u003e5\u003c/sup\u003e),表示点的个数和边的个数。\u003c/p\u003e\n\u003cp\u003e之后m行,每行包含整数u和v(1\u0026lt;\u003du,v\u0026lt;\u003dn; u!\u003dv),表示顶点u和v之间存在一条边。\u003c/p\u003e\n\u003cp\u003e保证n的和不超过3 * 10\u003csup\u003e5\u003c/sup\u003e; 保证m的和不超过3 * 10\u003csup\u003e5\u003c/sup\u003e。\u003c/p\u003e\n"}},{"title":"Output","value":{"format":"HTML","content":"对于每组测试测试数据,输出一行一个整数表示答案。答案取模998244353。"}},{"title":"Example","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e2\n2 1\n1 2\n4 6\n1 2\n1 3\n1 4\n2 3\n2 4\n3 4\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e4\n0\n\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003e对于第一组测试数据:\u003c/p\u003e\n\u003cp\u003eway1: Weight1\u003d1,Weight2\u003d2\u003c/p\u003e\n\u003cp\u003eway2: Weight1\u003d3,Weight2\u003d2\u003c/p\u003e\n\u003cp\u003eway3: Weight1\u003d2,Weight2\u003d1\u003c/p\u003e\n\u003cp\u003eway4: Weight1\u003d2,Weight2\u003d3\u003c/p\u003e\n\u003cp\u003e其中, Weightx 表示 顶点 x 的权值。\u003c/p\u003e\n"}}]}