{"id":245,"date":"2010-05-08T15:05:00","date_gmt":"2010-05-08T07:05:00","guid":{"rendered":"http:\/\/localhost\/?p=245"},"modified":"2010-05-08T15:05:00","modified_gmt":"2010-05-08T07:05:00","slug":"ahoi1997_fluttering_flags","status":"publish","type":"post","link":"https:\/\/www.shuizilong.com\/wjmzbmr\/?p=245","title":{"rendered":"[AHOI1997]\u5f69\u65d7\u98d8\u98d8"},"content":{"rendered":"<p> <a href=\"http:\/\/www.rqnoj.cn\/Problem_371.html\" target=\"_blank\">www.rqnoj.cn\/Problem_371.html<\/a><br \/>\u8fd9\u9053\u9898\u5176\u5b9e\u5f88\u7b80\u5355\uff0c\u4f46\u6211WA\u4e862\u6b21\u3002\u3002\u539f\u56e0\u662f\u641e\u4e0d\u6e05\u695a\u8fb9\u754c\u6761\u4ef6\u3002\u3002<br \/>\u5b9e\u9645\u4e0a\u5f80\u540e\u63a8\u7684\u65b9\u4fbf\u591a\u4e86\u56e7\u3002\u3002\u4e00\u4e0b\u5c31AC\u3002\u3002\u3002<br \/>Code\uff1a<br \/>#include &lt;vector&gt;<br \/>#include &lt;algorithm&gt;<br \/>#include &lt;utility&gt;<br \/>#include &lt;iostream&gt;<br \/>#include &lt;cstdio&gt;<br \/>#include &lt;cmath&gt;<br \/>#include &lt;cstdlib&gt;<br \/>#define rep(i,n) for(int i=0;i&lt;n;i++)<br \/>#define pb push_back<br \/>const int inf=~0U&gt;&gt;1,maxn=15+10;<br \/>using namespace std;<br \/>typedef long long ll;<br \/>ll Dp[maxn][maxn][maxn][2]={};<br \/>int main()<br \/>{<br \/>    \/\/freopen(&quot;in&quot;,&quot;r&quot;,stdin);<br \/>    int n,m;cin&gt;&gt;n&gt;&gt;m;<br \/>    Dp[1][0][0][0]=Dp[0][1][0][1]=1;<br \/>    for(int l=1;l&lt;n*2;l++)<br \/>        for(int a=0;a&lt;=min(l,n);a++)<br \/>        {<br \/>            int b=l-a;<br \/>            for(int c=0;c&lt;=m;c++)<br \/>                for(int l=0;l&lt;2;l++)<br \/>                    if(ll x=Dp[a][b][l])<br \/>                    {<br \/>                        Dp[a+1][b][0]+=x;<br \/>                        Dp[a][b+1][1]+=x;<br \/>                    }<br \/>        }<br \/>    cout&lt;&lt;Dp[n][n][m][0]*2&lt;&lt;endl;<br \/>} <\/p>\n","protected":false},"excerpt":{"rendered":"<p>www.rqnoj.cn\/Problem_371.html\u8fd9\u9053\u9898\u5176\u5b9e\u5f88\u7b80\u5355\uff0c\u4f46\u6211WA\u4e862\u6b21\u3002\u3002\u539f\u56e0\u662f\u641e\u4e0d\u6e05\u695a\u8fb9\u754c\u6761\u4ef6\u3002\u3002\u5b9e\u9645\u4e0a\u5f80\u540e\u63a8\u7684\u65b9\u4fbf\u591a\u4e86\u56e7\u3002\u3002\u4e00\u4e0b\u5c31AC\u3002\u3002\u3002Code\uff1a#include &lt;vector&gt;#include &lt;algorithm&gt;#include &lt;utility&gt;#include &lt;iostream&gt;#include &lt;cstdio&gt;#include &lt;cmath&gt;#include &lt;cstdlib&gt;#define rep(i,n) for(int i=0;i&lt;n;i++)#define pb push_backconst int inf=~0U&gt;&gt;1,maxn=15+10;using namespace std;typedef long long ll;ll Dp[maxn][maxn][maxn][2]={};int main(){ \/\/freopen(&quot;in&quot;,&quot;r&quot;,stdin); int n,m;cin&gt;&gt;n&gt;&gt;m; Dp[1][0][0][0]=Dp[0][1][0][1]=1; for(int l=1;l&lt;n*2;l++) for(int a=0;a&lt;=min(l,n);a++) { int b=l-a; for(int c=0;c&lt;=m;c++) for(int l=0;l&lt;2;l++) if(ll x=Dp[a][b][l]) { Dp[a+1][b][0]+=x; Dp[a][b+1][1]+=x; } } cout&lt;&lt;Dp[n][n][m][0]*2&lt;&lt;endl;}<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=\/wp\/v2\/posts\/245"}],"collection":[{"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=245"}],"version-history":[{"count":0,"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=\/wp\/v2\/posts\/245\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=245"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=245"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shuizilong.com\/wjmzbmr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=245"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}