隨筆-3  評論-0  文章-0  trackbacks-0
            2010年6月2日
               摘要: 前兩天我參加了網易舉辦的有道難題,只做出了兩道題,結果給出的提示都是運行超時(運行時間超過1000ms了)。希望大家幫我優化一下程序,如果程序中有什么不規范的也請您指出。謝謝大家了。 題目內容如下: A:有“道”難題 描述 ‘道’是中國古代哲學的重要范疇。用以說明世界的本原、本體、規律或原理。在不同的哲學體系中,其涵義有所不同。老子所寫...  閱讀全文
          posted @ 2010-06-02 10:44 fzllcc 閱讀(227) | 評論 (0)編輯 收藏
            2010年4月27日

          package com.test.paixu;

          public class MyPaixu {
           
           public void paixu(char[] a,String tempStr){
            
            for(int i=0;i<a.length;i++){
             String temp = tempStr;
             if(1==a.length){
              temp+=a[0];
              System.out.println(temp);
              break;
             }
             char[] tempChar = new char[a.length-1];
             int t=0;
             temp+=a[i];
             for(int j=0;j<i;j++){
              tempChar[t]=a[j];
              t++;
             }
             for(int j=i+1;j<a.length;j++){
              tempChar[t]=a[j];
              t++;
             }
             paixu(tempChar,temp);
             
            }
           }
           public MyPaixu(){
            String str = "abcd";
            char[] ch = str.toCharArray();
            paixu(ch,"");
           }
           public static void main(String[] args){
            new MyPaixu();
           }
          }

           

          posted @ 2010-04-27 12:04 fzllcc 閱讀(141) | 評論 (0)編輯 收藏
            2010年4月1日

          這兩天來到了這個博客園,看到了好多優秀的文章。我就想來這里學習點知識。

          posted @ 2010-04-01 12:04 fzllcc 閱讀(123) | 評論 (0)編輯 收藏
          僅列出標題  
          主站蜘蛛池模板: 竹溪县| 东辽县| 会理县| 河东区| 大城县| 新营市| 新昌县| 宾阳县| 台湾省| 连江县| 丰原市| 吉木萨尔县| 甘洛县| 亚东县| 安西县| 鄂伦春自治旗| 色达县| 石棉县| 荔波县| 炎陵县| 平利县| 崇州市| 晋宁县| 集安市| 东丰县| 边坝县| 隆昌县| 泗洪县| 太白县| 宁津县| 城市| 德昌县| 定襄县| 新宁县| 张家口市| 孟州市| 永平县| 金秀| 新沂市| 安陆市| 宁蒗|