• <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>
            付翔的專欄
            在鄙視中成長(zhǎng) 記錄成長(zhǎng)的點(diǎn)滴
            posts - 106,  comments - 32,  trackbacks - 0

            今天做了一天的水題

            http://acm.hdu.edu.cn/showproblem.php?pid=1081

            二維的最大子序列

            int data[1025][1025],value[1025];

            int maxFun(int n)
            {
                
            int max,result= INT_MIN,i;
                
            for(max = 0,i = 0 ; i < n ; i ++)
                {
                    max 
            +=value[i];
                    
            if(max > result)
                        result 
            = max;
                    
            if(max < 0)
                        max 
            = 0;
                }
                
            return result;
            }
            using namespace std;
            int main()
            {
            //    freopen("in.txt","r",stdin);
                int i,j,k,T,max,maxResult;
                
            while(scanf("%d",&T)!=EOF)
                {
                    
                    
            for(i = 0; i < T ; i ++)
                        
            for(j = 0; j < T; j ++)
                            scanf(
            "%d",&data[i][j]);
                    max 
            = 0; maxResult = INT_MIN;
                    
            for(i = 0; i < T; i ++)
                    {
                        memset(value,
            0,sizeof(value));
                        
            for(j = i ; j < T ; j ++)
                        {
                            
            for(k = 0; k < T; k ++)
                                value[k] 
            +=data[j][k];

                            max 
            = maxFun(T);
                            
            if(max > maxResult)
                                maxResult 
            = max;
                        }
                    }
                    printf(
            "%d\n",maxResult);
                }
                
            return 0;
            }

            http://acm.hdu.edu.cn/showproblem.php?pid=1062
            字符串翻轉(zhuǎn)
            int main()
            {
                
            int T,i,len,j;
                
            char c,str[1000],result[1000];
                scanf(
            "%d",&T);
                getchar();
                
            while(T--)
                {
                    gets(str);
                    len 
            = strlen(str);
                    
            //strcpy(result," ");
                    for(j = 0,i = 0 ; i < len; i ++)
                    {
                        
            if(str[i] == ' ')
                        {
                            result[j] 
            = '\0';
                            printf(
            "%s ",strrev(result));
                            j 
            = 0;
                        }
                        
            else if(i == len - 1)
                        {
                            result[j
            ++= str[i];
                            result[j] 
            = '\0';
                            printf(
            "%s",strrev(result));
                        }
                        
            else
                        {
                            result[j
            ++= str[i];
                        }
                    }
                    printf(
            "\n");
                }
                
            return 0;
            }


            http://acm.hdu.edu.cn/showproblem.php?pid=1060

            這里是要用到 對(duì)于任意的數(shù)num 都可表示為  10^(a +b) 其中a>1 b < 1 且 10^b   的有效數(shù)字就是num 的有效數(shù)字
            給出一個(gè)n 求n^n 的最開始的數(shù)
            #include <iostream>
            #include 
            <cmath>
            using namespace std;
            int main()
            {
                
            int m,n,i,ans;
                
            double a,b;
                scanf(
            "%d",&n);
                
            for(i=0;i<n;i++)
                {
                    scanf(
            "%d",&m);
                    
            //a = m*log10(m*1.0);
                    b=m*log10(m*1.0)-(__int64)(m*log10(m*1.0));
                    b
            =pow((double)10,b);
                    ans
            =(int)b;
                    printf(
            "%d %d\n",(int)a,ans);
                }

                
            return 0;
            }


            posted on 2010-08-09 17:49 付翔 閱讀(105) 評(píng)論(0)  編輯 收藏 引用 所屬分類: ACM 數(shù)據(jù)結(jié)構(gòu)

            <2025年5月>
            27282930123
            45678910
            11121314151617
            18192021222324
            25262728293031
            1234567

            常用鏈接

            留言簿(2)

            隨筆分類

            隨筆檔案

            文章分類

            文章檔案

            CSDN - 我的blog地址

            博客

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

            久久这里只有精品18| 久久福利片| 久久精品九九亚洲精品| 亚洲欧美日韩久久精品| 久久这里都是精品| 丁香五月网久久综合| 成人亚洲欧美久久久久| 青青久久精品国产免费看| 久久国产精品无| 久久99国产精品99久久| 久久综合狠狠色综合伊人| 久久久99精品成人片中文字幕| 久久久精品日本一区二区三区| 无码人妻久久一区二区三区蜜桃| 97精品依人久久久大香线蕉97| 国产精品久久久久久久久| 久久精品国产WWW456C0M| 99精品久久久久久久婷婷| 91精品国产综合久久婷婷| 久久久青草青青国产亚洲免观| 久久精品国产2020| 亚洲人成网站999久久久综合 | 亚洲人成网站999久久久综合| 久久久久久亚洲精品影院| 国产精品九九九久久九九| 一本色道久久综合| 久久精品视频91| 久久国产成人| 久久久不卡国产精品一区二区| 无码人妻精品一区二区三区久久| 久久精品无码一区二区三区免费| 亚洲女久久久噜噜噜熟女| 久久毛片免费看一区二区三区| 久久777国产线看观看精品| 色狠狠久久综合网| 国产精品久久久久久久人人看 | 区久久AAA片69亚洲 | 国产一区二区精品久久| 亚洲精品成人久久久| 国内精品久久久久久不卡影院| 狠狠色婷婷久久一区二区三区|