{"height":"190","url":"https://torus711.hatenablog.com/entry/2026/01/04/212735","image_url":null,"type":"rich","author_name":"torus711","author_url":"https://blog.hatena.ne.jp/torus711/","blog_title":"torus711 \u306e\u30a2\u30ec","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftorus711.hatenablog.com%2Fentry%2F2026%2F01%2F04%2F212735\" title=\"AtCoder Beginner Contest 439, F : Beautiful Kadomatsu - torus711 \u306e\u30a2\u30ec\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","provider_name":"Hatena Blog","provider_url":"https://hatena.blog","blog_url":"https://torus711.hatenablog.com/","version":"1.0","published":"2026-01-04 21:27:35","description":"\u554f\u984c\u6587 https://atcoder.jp/contests/abc439/tasks/abc439_f \u554f\u984c\u6982\u8981 \u30b5\u30a4\u30ba $n$ \u306e\u9806\u5217 $P = \\langle P_1, P_2, \\dots, P_n \\rangle$ \u304c\u4e0e\u3048\u3089\u308c\u308b\uff0e$P$ \u306e\u90e8\u5206\u5217 $\\langle A_1, A_2, \\dots, A_k \\rangle$ \u306b\u3064\u3044\u3066\uff0c\u6b21\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u3082\u306e\u306e\u500b\u6570\u3092\uff08${} \\bmod {998{,}244{,}353}$ \u3067\uff09\u6c42\u3081\u3088\uff0e $x = \\#\\{ i \\in \\{ 1, 2, \\dots, n \\} \\mid 1 A_{ i + 1 } \\}$ \u3068\u3059\u308b $y = \\#\\{ i\u2026","title":"AtCoder Beginner Contest 439, F : Beautiful Kadomatsu","categories":["AtCode","Segment Tree"]}