• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            心如止水
            Je n'ai pas le temps
            posts - 400,comments - 130,trackbacks - 0
            2985ms AC。
            以下是我的代碼:
            /*
             * Author:  lee1r
             * Created Time:  2011/8/6 10:45:18
             * File Name: poj2531.cpp
             
            */
            #include
            <iostream>
            #include
            <sstream>
            #include
            <fstream>
            #include
            <vector>
            #include
            <list>
            #include
            <deque>
            #include
            <queue>
            #include
            <stack>
            #include
            <map>
            #include
            <set>
            #include
            <bitset>
            #include
            <algorithm>
            #include
            <cstdio>
            #include
            <cstdlib>
            #include
            <cstring>
            #include
            <cctype>
            #include
            <cmath>
            #include
            <ctime>
            #define L(x) ((x)<<1)
            #define R(x) (((x)<<1)+1)
            #define Half(x) ((x)>>1)
            #define lowbit(x) ((x)&(-(x)))
            using namespace std;
            const int kInf(0x7f7f7f7f);
            const double kEps(1e-8);
            typedef 
            long long int64;
            typedef unsigned 
            long long uint64;

            const int kMaxn(27);

            int n,g[kMaxn][kMaxn];
            bool d[kMaxn];
            int64 ans;

            void dfs(int depth)
            {
                
            if(depth>n)
                {
                    
            int now(0);
                    
            for(int i=2;i<=n;i++)
                        
            for(int j=1;j<i;j++)
                            
            if(d[i]==!d[j])
                                now
            +=g[i][j];
                    
            if(ans<now)
                        ans
            =now;
                    
            return;
                }
                d[depth]
            =true;
                dfs(depth
            +1);
                d[depth]
            =false;
                dfs(depth
            +1);
            }

            int main()
            {
                
            //freopen("data.in","r",stdin);
                
                
            while(scanf("%d",&n)==1)
                {
                    
            for(int i=1;i<=n;i++)
                        
            for(int j=1;j<=n;j++)
                            scanf(
            "%d",&g[i][j]);
                    
                    ans
            =0;
                    memset(d,
            false,sizeof(d));
                    dfs(
            1);
                    
                    cout
            <<ans<<endl;
                }
                
                
            return 0;
            }
            posted on 2011-08-06 11:00 lee1r 閱讀(574) 評(píng)論(0)  編輯 收藏 引用 所屬分類(lèi): 題目分類(lèi):搜索
            久久精品国产一区二区三区| 亚洲国产另类久久久精品| 久久久一本精品99久久精品88| 久久夜色精品国产欧美乱| 激情久久久久久久久久| 亚洲国产精品无码久久98| 亚洲AV日韩AV永久无码久久| 四虎国产永久免费久久| 久久av无码专区亚洲av桃花岛| 国产精品视频久久| 人妻无码αv中文字幕久久琪琪布| 欧美一区二区三区久久综| 久久综合久久综合久久| 2021最新久久久视精品爱| 久久婷婷五月综合97色直播| 93精91精品国产综合久久香蕉 | 亚洲国产日韩综合久久精品| 欧美日韩中文字幕久久伊人| 国产精品久久久久免费a∨| 久久国产精品久久国产精品| avtt天堂网久久精品| 国产精品久久久久久久久软件| 亚洲国产天堂久久综合网站| 久久亚洲精精品中文字幕| 四虎国产精品成人免费久久| 久久久久国产精品三级网| 久久亚洲国产午夜精品理论片| 天天躁日日躁狠狠久久| 久久久精品国产| 久久夜色精品国产亚洲av| 国产999精品久久久久久| 欧美激情精品久久久久久| 97久久精品人人做人人爽| 国产欧美久久久精品| 996久久国产精品线观看| 国产精品免费看久久久 | 精品一区二区久久| 久久久久久亚洲精品成人| 久久影院综合精品| 久久久久人妻一区精品色| 2021久久精品国产99国产精品|