{"trustable":false,"prependHtml":"\u003cstyle type\u003d\"text/css\"\u003e\n #problem-body \u003e pre {\n display: block;\n padding: 9.5px;\n margin: 0 0 10px;\n font-size: 13px;\n line-height: 1.42857143;\n word-break: break-all;\n word-wrap: break-word;\n color: #333;\n background: rgba(255, 255, 255, 0.5);\n border: 1px solid #ccc;\n border-radius: 6px;\n }\n\u003c/style\u003e\n","sections":[{"title":"题面","value":{"format":"HTML","content":"王德发最近开始学习图论,老师给了他一个无向图,王德发想知道这副图是不是一颗树,你能帮帮他吗?"}},{"title":"输入","value":{"format":"HTML","content":"第一行包含两个整数N和M ---- 图中的节点数和边数 (0 \u003c N \u003c\u003d 10000, 0 \u003c\u003d M \u003c\u003d 20000)。\n接下来的M行包含该图的M条边 --- 每行包含一对 ( u , v ) 表示节点u和节点v之间有一条边(1 \u003c\u003d u , v \u003c\u003d N )。"}},{"title":"输出","value":{"format":"HTML","content":"输出\u003cbr\u003e\n如果给定的图是树,则打印YES ,否则打印NO。"}},{"title":"Sample1","value":{"format":"HTML","content":"\u003ch5\u003einput\u003c/h5\u003e\n3 2\u003cbr\u003e\n1 2\u003cbr\u003e\n2 3\u003cbr\u003e\n\u003ch5\u003eoutput\u003c/h5\u003e\nYES"}}]}