{"description":"ABC429E \u89e3\u6cd5 \u591a\u59cb\u70b9BFS. \u30a4\u30e1\u30fc\u30b8\u3068\u3057\u3066\u306f\uff0c\u59cb\u70b9\u3068path \u306b\u8272\u3092\u4ed8\u3051\u3066\u533a\u5225\u3057\u306a\u304c\u3089 BFS. \u4f7f\u3063\u3066\u3044\u308b\u8a18\u53f7\uff0c\u30de\u30af\u30ed\u7b49 \"https://ecsmtlir.hatenablog.com/entry/2022/12/23/131925\" int main() { ll n,m; cin >> n >> m; vvll to(n); rep(i,m){ ll a,b; cin >> a >> b; --a, --b; to[a].push_back(b); to[b].push_back(a); } string s; cin >> s; using T = tuple<ll,ll,\u2026","categories":[],"provider_url":"https://hatena.blog","published":"2026-02-11 07:48:08","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fecsmtlir.hatenablog.com%2Fentry%2F2026%2F02%2F11%2F074808\" title=\"AtCoder Beginner Contest 429E\u554f\u984c - \u7af6\u6280\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","url":"https://ecsmtlir.hatenablog.com/entry/2026/02/11/074808","blog_title":"\u7af6\u6280\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u65e5\u8a18","type":"rich","blog_url":"https://ecsmtlir.hatenablog.com/","height":"190","author_url":"https://blog.hatena.ne.jp/ecsmtlir/","title":"AtCoder Beginner Contest 429E\u554f\u984c","image_url":null,"width":"100%","version":"1.0","author_name":"ecsmtlir"}