当前位置:编程学习 > C#/ASP.NET >>

转一个算法题目,有兴趣的来

--------------------编程问答--------------------

老曹你图挂了  --------------------编程问答--------------------
引用 1 楼 q107770540 的回复:


老曹你图挂了 

老曹也发现了,现在修好了。 --------------------编程问答-------------------- 取走3颗 2 6 8 或 4 3 9 --------------------编程问答-------------------- 看不到图啊 --------------------编程问答-------------------- --------------------编程问答--------------------
引用 3 楼 Net_Java_dram 的回复:
取走3颗 2 6 8 或 4 3 9

肯定不对。取走268,1 7 10就能构成。
大家动动脑筋再回答!300分不是白送的! --------------------编程问答-------------------- 分析:
1 2 3 之中有1颗必须要拿开  
1 4 6 同上
1 7 10 同上
2 4 5 同上
2 3 5
2 7 9 
3 5 6
3 8 10
4 7 8
4 5 8
5 8 9
5 6 9
6 9 10

大家找规律哈 --------------------编程问答-------------------- 容我三思~~~ --------------------编程问答-------------------- 1,5,7,10 --------------------编程问答-------------------- 看不到图啊,论坛相册的图都看不到啦 --------------------编程问答-------------------- 1 3 4 9 --------------------编程问答--------------------  1 5 8 9四颗? --------------------编程问答--------------------
引用 3 楼 Net_Java_dram 的回复:
取走3颗 2 6 8 或 4 3 9

1,7,10还是等边啊。。。,估计你得1,2,6,8 --------------------编程问答--------------------  想想看看!! --------------------编程问答--------------------
引用 6 楼 caozhy 的回复:
Quote: 引用 3 楼 Net_Java_dram 的回复:

取走3颗 2 6 8 或 4 3 9

肯定不对。取走268,1 7 10就能构成。
大家动动脑筋再回答!300分不是白送的!

取走3个顶点任意一点,就变成梯形了吧,但算法不知道怎么写。。 --------------------编程问答-------------------- 试了几次都至少要去4个 --------------------编程问答-------------------- 当我没说 我2b
--------------------编程问答-------------------- 1,5,7,10 应该是正解了. 具体思路如下:

先将可组成等边三角的数字列出, 如: 
1,2,3
1,4,6
1,7,10
......
统计出现最多的数字: 得出 5, 第一步先干掉5, 并删除上面含5的组合. 
继续统计出现最多的数字: 得出 1,7,10 干掉1, 并删除含一的组合, 循环...得出 7,10直到组合清空. --------------------编程问答-------------------- --------------------编程问答-------------------- 2 8 6 ?
3 4 9?

引用 楼主 caozhy 的回复:
--------------------编程问答-------------------- 1、2、3、8、9五颗 --------------------编程问答-------------------- 看成一个有坐标的二维树形结构,然后 从先序遍历,算和左右孩子的距离,得到所有等边三角形 然后在找去掉哪些点, --------------------编程问答-------------------- 目测1,5,8,9

算法本质是01背包问题. --------------------编程问答-------------------- 稍微定神细思就能确定最少取4个蓝莓号1、5、7、10即三个顶尖+中。 --------------------编程问答--------------------
引用 24 楼 xianfajushi 的回复:
稍微定神细思就能确定最少取4个蓝莓号1、5、7、10即三个顶尖+中。

349

268 应该也是等边吧、、 --------------------编程问答-------------------- 1, 2, 8, 6 --------------------编程问答-------------------- 4颗!拿掉3,5,8,10(或2,5,7,9或1,4,5,6) --------------------编程问答-------------------- 正常的
    a
   x x
  b x c

左右孩子的间距为X 

这样的规律应该可以弄个循环吧~   

觉得 


引用 18 楼 Johnyin 的回复:
1,5,7,10 应该是正解了. 具体思路如下:

先将可组成等边三角的数字列出, 如: 
1,2,3
1,4,6
1,7,10
......
统计出现最多的数字: 得出 5, 第一步先干掉5, 并删除上面含5的组合. 
继续统计出现最多的数字: 得出 1,7,10 干掉1, 并删除含一的组合, 循环...得出 7,10直到组合清空.
 的方法应该是可以的

只是不知道
不知道  349  268  算不算?
--------------------编程问答-------------------- 1,5,8,9
7,5,3,6
10,5,2,4 --------------------编程问答-------------------- 凭感觉 凭直觉 拿走三颗就可以实现   有三种分析:
245 
356 
589
谢谢! --------------------编程问答--------------------  2 6 8          
3 4 9 --------------------编程问答-------------------- 补充 :还有两种:
268 349 --------------------编程问答-------------------- 1、5、8、9.....第一行那颗拿掉,然后下面的只留边上两颗,其他的都拿掉。  --------------------编程问答-------------------- 暴力枚举:
取走一颗不行,
取走两颗不行,
取走三颗不行,

只能取走四颗了
一个方案是:
1,5,8,9
--------------------编程问答--------------------
引用 25 楼 ShenShiampMoYi 的回复:
Quote: 引用 24 楼 xianfajushi 的回复:

稍微定神细思就能确定最少取4个蓝莓号1、5、7、10即三个顶尖+中。

349

268 应该也是等边吧、、

噢可这个......那要这么说的话,1、5、8、9就是了。或7、5、3、6这样打转一圈都可以
对于1、2、8、6也可以做一圈打转 --------------------编程问答--------------------
引用 35 楼 xianfajushi 的回复:
Quote: 引用 25 楼 ShenShiampMoYi 的回复:

Quote: 引用 24 楼 xianfajushi 的回复:

稍微定神细思就能确定最少取4个蓝莓号1、5、7、10即三个顶尖+中。

349

268 应该也是等边吧、、

噢可这个......那要这么说的话,1、5、8、9就是了。或7、5、3、6这样打转一圈都可以
对于1、2、8、6也可以做一圈打转
--------------------编程问答-------------------- 弱弱的问一句是不是不构成等边三角形就行呢?那是不是四边形也行?随便那个角上拿走一个不就好了? --------------------编程问答--------------------
引用 9 楼 Johnyin 的回复:
1,5,7,10
3 4 9也能构成呢 --------------------编程问答-------------------- 既然涉及到算法了,
那就是说,
不能仅仅适用于现在这个问题,
而是要适用于所有这一类的问题。

个人认为,首先要罗列出所有能构成等边三角形的情况,
然后两两比较,取出共有的,
然后,继续筛选,取出共有的。
直至最终任意三个都无法构成等边三角形。 --------------------编程问答-------------------- 那总结一下就是最好取4蓝莓
1、5、8、9
1、2、6、8
1、3、4、9
转圈组合的数字都可以。 --------------------编程问答-------------------- 没有角就成不了三角形,所以只留一条平行线至少取走任意一边对立的一个等边三角形 --------------------编程问答--------------------
引用 41 楼 wangtianling 的回复:
没有角就成不了三角形,所以只留一条平行线至少取走任意一边对立的一个等边三角形


也就是说至少取走6个,并且这六个必须成等边三角形。没上过大学没学过高数,就知道这些 --------------------编程问答--------------------
引用 18 楼 Johnyin 的回复:
1,5,7,10 应该是正解了. 具体思路如下:

先将可组成等边三角的数字列出, 如: 
1,2,3
1,4,6
1,7,10
......
统计出现最多的数字: 得出 5, 第一步先干掉5, 并删除上面含5的组合. 
继续统计出现最多的数字: 得出 1,7,10 干掉1, 并删除含一的组合, 循环...得出 7,10直到组合清空.
我同意18L的方法,但是他忽略了3 4 9和2 5 8也可以组成等边三角形
所以答案是 1 5 8 9 / 7 5 3 6 /10 5 2 4 --------------------编程问答-------------------- --------------------编程问答--------------------     [1] => 3
    [2] => 4
    [3] => 4
    [4] => 4
    [6] => 4
    [7] => 3
    [10] => 3
    [5] => 6
    [9] => 4
    [8] => 4
--------------------编程问答-------------------- 可构成等边三角形的球
1,2,3
1,4,6
1,7,10
2,4,5
2,5,3
2,7,9
3,5,6
3,8,10
4,7,8
4,8,5
5,8,9
5,9,6
6,9,10 --------------------编程问答--------------------
引用 42 楼 wangtianling 的回复:
Quote: 引用 41 楼 wangtianling 的回复:

没有角就成不了三角形,所以只留一条平行线至少取走任意一边对立的一个等边三角形


也就是说至少取走6个,并且这六个必须成等边三角形。没上过大学没学过高数,就知道这些


我是这样想的   一共10个点 不管数字的意义    若为等边必须要固定的3个点  重新定义10个数字  为了不让等边  每3个去掉1个点   最后会多出一个点   这个点可能会和之前的点构成等边三角形  所以也去掉   那结果就是4个了。   --------------------编程问答--------------------
引用 45 楼 xuzuning 的回复:
    [1] => 3
    [2] => 4
    [3] => 4
    [4] => 4
    [6] => 4
    [7] => 3
    [10] => 3
    [5] => 6
    [9] => 4
    [8] => 4
 

349  286??  --------------------编程问答-------------------- 列举所有等边三角形,把含有最多的一个数字(5)去掉
同上,去掉(1或7或10)
同上,去掉(89或36或24)
等边三角形个数为0 --------------------编程问答-------------------- X,确实忽略了268 和439. 不过方法应该没错. --------------------编程问答-------------------- 话说我的行车原则:1让,2停,3拯救生命,题外话 --------------------编程问答-------------------- 123、478、6910;这三个是没有任何交点的三个三角形,干这三个就要最少去掉3个点才能满足条件;

楼主,求解释; --------------------编程问答-------------------- 看不懂题目,汗,
楼主应该列举几个结果图看看 --------------------编程问答-------------------- 把其中7个拿走了不就无法构成等边三角形了呗 --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- 学历有限  想到的法子没几个
呵呵
关注 --------------------编程问答-------------------- 去掉2,3,5,7,10或者换个角度
--------------------编程问答--------------------
Quote: 引用 58 楼 microtry 的回复:

去掉2,3,5,7,10或者换个角度
Quote:

错了,智商太低 --------------------编程问答-------------------- 123456和12345678910第一方案最少我的算法里
--------------------编程问答-------------------- --------------------编程问答-------------------- 解题思路:一条直线不构成三角形,少于三个点也不是三角形,这个数以下再推都是等边三角形 --------------------编程问答--------------------
引用 9 楼 Johnyin 的回复:
1,5,7,10

349破之 --------------------编程问答-------------------- 我觉得四个不行 至少要五个吧,可能还要高
再看看 --------------------编程问答-------------------- 1,9,5,8 --------------------编程问答-------------------- 肯定是2,6,8 --------------------编程问答-------------------- 用一个指令周期可以做出的题目不叫算法 --------------------编程问答-------------------- 好难。。。。。。。 --------------------编程问答-------------------- 目测:

1  5 8 9
7  5 6 3
10 5 4 2

其他还看不出. --------------------编程问答-------------------- 1.5.8.9 --------------------编程问答-------------------- 二叉树中序遍历就ok了,遍历一边就ok。每个点都遍历到,条件自然就完备了 --------------------编程问答--------------------
引用 69 楼 vbyes 的回复:
目测:

1  5 8 9
7  5 6 3
10 5 4 2

其他还看不出.



不考虑旋转,  1 个大的等边三角形,  3 个中等边三角形. 9 个小等边三角形,   只要不使它们成形. 

比如的 大的等边 , 1  7   10  肯定要拿走一个........... --------------------编程问答-------------------- --------------------编程问答-------------------- 感觉好难。。。。 --------------------编程问答-------------------- 需要取走4个,图中,等边三角形规模,按边上蓝每个数算,有2 3 4三种规模。要破坏所有最小规模的等边三角形,可以在每个 2-规模 的等边三角形中拿掉一个点,例如:1 5 8 9,剩下的图形不构成三角形,满足条件。从其他的角度看,也可以拿掉其他的点,最小数目就是4个。 --------------------编程问答-------------------- 1) 1,7,10 构成的大三角中,去一个,假设去掉1
2) 剩下2,7,9和3,8,10构成的次大三角中,8,9处于两三角重合处,需全部去掉
3) 剩下2,4,5和3,5,6组成的小三角,去掉重合的5
故去掉1,5,8,9

去掉7或10的情况采用同样的分析方法,故取法的总数为3种,每种都需最少取4个 --------------------编程问答-------------------- 头疼。。。。。。。 --------------------编程问答-------------------- 0个吧- -,只移动不取出蓝莓的位置 --------------------编程问答-------------------- 只有梯形,且中间为空才会达到任意三个都不是等边三角形的吧
所以很明显,
1,5,8,9
7,5,3,6
10,5,2,4
这三种是最少了吧
去掉三个的目前想不出。 --------------------编程问答-------------------- 三个应该不可能的吧,无论怎么去掉三个,都会有另一组三个是连接在一起的,那么这一组肯定能组成等边三角形,所以三个是不行的吧,在下愚见 --------------------编程问答-------------------- 1 5 7 10
 1 5 8 9
7 5 3 6
10 5 2 4

共四种
--------------------编程问答-------------------- 学习了。。。 --------------------编程问答--------------------  1  3  5    4  89   --------------------编程问答-------------------- 原来是3567啊

我算出来了
有截图 
等会上算法。



--------------------编程问答--------------------
using System;
using System.Collections.Generic;
using System.Text;

namespace Consoletest001.MyGame
{
    public  class  Point
    {
        public Point(double x, double y)
        {
            this.X = x;
            this.Y = y;
        }
         private static double GetLenght(Point p1 ,Point p2)
         {
           return  Math.Sqrt(Math.Pow(p1.X - p2.X, 2) + Math.Pow(p1.Y - p2.Y, 2));
         }
         private static bool IsEqual(double l1, double l2,double l3)
         {
             if (Math.Abs(l1-l2)<0.001 && Math.Abs(l2-l3)<0.001 && Math.Abs(l3-l1)<0.001 )
             {
                 return true;
             }
             return false;
         }
         public static bool IsTrl(Point p1, Point p2,Point p3)
         {
             if (IsEqual(GetLenght(p1,p2),GetLenght(p2,p3),GetLenght(p1,p3)) )
             {
                 return true;
             }
             return false;
         }
         public double X { get; set; }
         public double Y { get; set; }
    }
   public  class TenPointGame
    {
        public  Point [] tenP = new  Point[11];
        public TenPointGame()
        {
            InitTenPints();
        }
        public bool IsTrl(int p1, int p2,int p3)
        {
            return Point.IsTrl(this.tenP[p1], this.tenP[p2], this.tenP[p3]);
        }
        private void InitTenPints()
        {
            double q3 = Math.Sqrt(3);
           
                tenP[1] = new Point(3,3*q3);
                tenP[2] = new Point(2, 2 * q3); 
                tenP[3] = new Point(4, 2 * q3); 
                tenP[4] = new Point(1,  q3); 
                tenP[5] = new Point(3,  q3); 
                tenP[6] = new Point(5,  q3); 
                tenP[7] = new Point(0, 0); 
                tenP[8] = new Point(2, 0); 
                tenP[9] = new Point(4, 0); 
                tenP[10] = new Point(6, 0); 
        }

       private IList<int[]> results = new List<int[]>();

       /// <summary>
       /// 组合算法,a为目标集合,n为集合数目,m和M为取的个数,b为new int[m]
       /// </summary>
        public void combine(int[] a, int n, int m, int[] b, int M )
        {

            for (int i = n; i >= m; i--) // 注意这里的循环范围
            {
                b[m - 1] = i - 1;
                if (m > 1)
                    combine(a, i - 1, m - 1, b, M);
                else // m == 1, 输出一个组合
                {
                    int[] temp = new int[M];

                    for (int j = M - 1; j >= 0; j--)
                    {
                        
                        temp[j] = a[b[j]];
                    }
                    results.Add(temp);
                  
                }
            }
        }

       /// <summary>
       /// 验证结果集的一种,里面的所有3个点,都不能组成正三角形,则返回true
       /// </summary>
       /// <param name="relust3"></param>
       /// <returns></returns>
        public bool allFaile(int[] relust6)
       {
           int[] b2 = new int[3];
           this.results.Clear();
           this.combine(relust6, 6, 3, b2, 3);
           IList<int[]> results3 = new List<int[]>();
           this.comcopy(this.results, results3);
           int countSucess = 0;
           foreach (var p3 in results3)
           {
               if (this.IsTrl(p3[0], p3[1], p3[2]))
               {
                   countSucess++;
                   break;
               }
           }
           if (countSucess == 0)
           {
               return true;
           }
           else
           {
               return false;
           }
       }

       public void comcopy(IList<int[]> oldList ,IList<int[]> newList)
       {
           foreach (var intse in oldList)
           {
               newList.Add(intse);
           }
       }

       public string printResult(int[] List)
       {
           string str = "";
           foreach (int i in List)
           {
               str += i + " ";
           }
           return str;
       }

       public static void Maintest1()
        {
            TenPointGame game = new TenPointGame();
         
           IList<string> resultstr = new List<string>();

           int[] a = {1,2,3,4,5,6,7,8,9,10};

            int[] b = new int[6] ;
            game.results.Clear();
           game.combine(a,10,6,b,6);
           IList<int[]> results6 = new List<int[]>( );
           game.comcopy(game.results, results6);
           int count = 0;
           for (int i = 0; i < results6.Count;i++ )
           {
               if (game.allFaile(results6[i]) )
               {
                   resultstr.Add(game.printResult(results6[i]));
               }
           }

           Console.WriteLine(resultstr[0]);
        }
    }
}
--------------------编程问答--------------------
引用 20 楼 ShenShiampMoYi 的回复:
2 8 6 ?
3 4 9?

Quote: 引用 楼主 caozhy 的回复:

晕,1、7、10也是啊,这么大你都没看到 --------------------编程问答-------------------- 这里对
http://www.cnblogs.com/nokiaguy/archive/2008/05/11/1191914.html
表示感谢,组合的算法是抄的这位博主的。 --------------------编程问答--------------------
引用 85 楼 sj178220709 的回复:
using System;
using System.Collections.Generic;
using System.Text;

namespace Consoletest001.MyGame
{
    public  class  Point
    {
        public Point(double x, double y)
        {
            this.X = x;
            this.Y = y;
        }
         private static double GetLenght(Point p1 ,Point p2)
         {
           return  Math.Sqrt(Math.Pow(p1.X - p2.X, 2) + Math.Pow(p1.Y - p2.Y, 2));
         }
         private static bool IsEqual(double l1, double l2,double l3)
         {
             if (Math.Abs(l1-l2)<0.001 && Math.Abs(l2-l3)<0.001 && Math.Abs(l3-l1)<0.001 )
             {
                 return true;
             }
             return false;
         }
         public static bool IsTrl(Point p1, Point p2,Point p3)
         {
             if (IsEqual(GetLenght(p1,p2),GetLenght(p2,p3),GetLenght(p1,p3)) )
             {
                 return true;
             }
             return false;
         }
         public double X { get; set; }
         public double Y { get; set; }
    }
   public  class TenPointGame
    {
        public  Point [] tenP = new  Point[11];
        public TenPointGame()
        {
            InitTenPints();
        }
        public bool IsTrl(int p1, int p2,int p3)
        {
            return Point.IsTrl(this.tenP[p1], this.tenP[p2], this.tenP[p3]);
        }
        private void InitTenPints()
        {
            double q3 = Math.Sqrt(3);
           
                tenP[1] = new Point(3,3*q3);
                tenP[2] = new Point(2, 2 * q3); 
                tenP[3] = new Point(4, 2 * q3); 
                tenP[4] = new Point(1,  q3); 
                tenP[5] = new Point(3,  q3); 
                tenP[6] = new Point(5,  q3); 
                tenP[7] = new Point(0, 0); 
                tenP[8] = new Point(2, 0); 
                tenP[9] = new Point(4, 0); 
                tenP[10] = new Point(6, 0); 
        }

       private IList<int[]> results = new List<int[]>();

       /// <summary>
       /// 组合算法,a为目标集合,n为集合数目,m和M为取的个数,b为new int[m]
       /// </summary>
        public void combine(int[] a, int n, int m, int[] b, int M )
        {

            for (int i = n; i >= m; i--) // 注意这里的循环范围
            {
                b[m - 1] = i - 1;
                if (m > 1)
                    combine(a, i - 1, m - 1, b, M);
                else // m == 1, 输出一个组合
                {
                    int[] temp = new int[M];

                    for (int j = M - 1; j >= 0; j--)
                    {
                        
                        temp[j] = a[b[j]];
                    }
                    results.Add(temp);
                  
                }
            }
        }

       /// <summary>
       /// 验证结果集的一种,里面的所有3个点,都不能组成正三角形,则返回true
       /// </summary>
       /// <param name="relust3"></param>
       /// <returns></returns>
        public bool allFaile(int[] relust6)
       {
           int[] b2 = new int[3];
           this.results.Clear();
           this.combine(relust6, 6, 3, b2, 3);
           IList<int[]> results3 = new List<int[]>();
           this.comcopy(this.results, results3);
           int countSucess = 0;
           foreach (var p3 in results3)
           {
               if (this.IsTrl(p3[0], p3[1], p3[2]))
               {
                   countSucess++;
                   break;
               }
           }
           if (countSucess == 0)
           {
               return true;
           }
           else
           {
               return false;
           }
       }

       public void comcopy(IList<int[]> oldList ,IList<int[]> newList)
       {
           foreach (var intse in oldList)
           {
               newList.Add(intse);
           }
       }

       public string printResult(int[] List)
       {
           string str = "";
           foreach (int i in List)
           {
               str += i + " ";
           }
           return str;
       }

       public static void Maintest1()
        {
            TenPointGame game = new TenPointGame();
         
           IList<string> resultstr = new List<string>();

           int[] a = {1,2,3,4,5,6,7,8,9,10};

            int[] b = new int[6] ;
            game.results.Clear();
           game.combine(a,10,6,b,6);
           IList<int[]> results6 = new List<int[]>( );
           game.comcopy(game.results, results6);
           int count = 0;
           for (int i = 0; i < results6.Count;i++ )
           {
               if (game.allFaile(results6[i]) )
               {
                   resultstr.Add(game.printResult(results6[i]));
               }
           }

           Console.WriteLine(resultstr[0]);
        }
    }
}

你可以对照下81楼。 --------------------编程问答-------------------- 1 5或5 7或5 10 --------------------编程问答--------------------

    static void Main(string[] args)
    {
        List<Item> items = new List<Item>();
        Item item1 = new Item(1);
        Item item2 = new Item(2);
        Item item3 = new Item(3);
        Item item4 = new Item(4);
        Item item5 = new Item(5);
        Item item6 = new Item(6);
        Item item7 = new Item(7);
        Item item8 = new Item(8);
        Item item9 = new Item(9);
        Item item10 = new Item(10);

        item1.SetItem(item2, 6);
        item1.SetItem(item3, 5);

        item2.SetItem(item4, 6);
        item2.SetItem(item5, 5);
        item2.SetItem(item3, 4);

        item3.SetItem(item5, 6);
        item3.SetItem(item6, 5);

        item4.SetItem(item7, 6);
        item4.SetItem(item8, 5);
        item4.SetItem(item5, 4);

        item5.SetItem(item8, 6);
        item5.SetItem(item9, 5);
        item5.SetItem(item6, 4);

        item6.SetItem(item9, 6);
        item6.SetItem(item10, 5);

        item7.SetItem(item8, 4);
        item8.SetItem(item9, 4);
        item9.SetItem(item10, 4);

        items.Add(item1);
        items.Add(item2);
        items.Add(item3);
        items.Add(item4);
        items.Add(item5);
        items.Add(item6);
        items.Add(item7);
        items.Add(item8);
        items.Add(item9);
        items.Add(item10);

        List<Item> result = new List<Item>();

        Item pick = items.Where(t => t.IsEnabled).OrderByDescending(t => t.GetTriangle()).FirstOrDefault();
        int count = pick.GetTriangle();
        while (count > 0)
        {
            result.Add(pick);
            pick.IsEnabled = false;
            pick = items.Where(t => t.IsEnabled).OrderByDescending(t => t.GetTriangle()).FirstOrDefault();
            if (pick == null)
                count = 0;
            else
                count = pick.GetTriangle();
        }

        foreach (Item item in result)
        {
            Console.WriteLine(item.ID);
        }

        Console.ReadLine();
    }
}

class Item
{
    public Item(int id)
    {
        ID = id;
        IsEnabled = true;
    }

    public int ID { get; private set; }

    static Item()
    {
        var type = typeof(Item);
        D = new PropertyInfo[6];
        D[0] = type.GetProperty("D1");
        D[1] = type.GetProperty("D2");
        D[2] = type.GetProperty("D3");
        D[3] = type.GetProperty("D4");
        D[4] = type.GetProperty("D5");
        D[5] = type.GetProperty("D6");
    }

    private static PropertyInfo[] D;
    public Item D1 { get; private set; }
    public Item D2 { get; private set; }
    public Item D3 { get; private set; }
    public Item D4 { get; private set; }
    public Item D5 { get; private set; }
    public Item D6 { get; private set; }

    public void SetItem(Item item, int d)
    {
        var property = D[d - 1];
        property.SetValue(this, item);
        if (D[GetDirection(d + 3) - 1].GetValue(item) == null)
        {
            D[GetDirection(d + 3) - 1].SetValue(item, this);
        }
    }

    private int GetDirection(int d)
        {
            if (d > 6)
                d -= 6;
            return d;
        }

    public bool IsEnabled { get; set; }

    public int GetTriangle()
    {
        int count = 0;
        for (int i = 1; i < 7; i++)
        {
            int d1 = i - 1;
            int d2 = GetDirection(i + 1) - 1;
            int d3 = GetDirection(i + 2) - 1;
            int d4 = GetDirection(i + 3) - 1;
            Item next1 = D[d1].GetValue(this) as Item;
            Item next2 = D[d2].GetValue(this) as Item;
            while (next1 != null && next2 != null)
            {
                if (next1.IsEnabled && next2.IsEnabled)
                    count++;
                Item next3 = next1;
                Item next4 = next2;
                while (D[d3].GetValue(next3) != next2)
                {
                    next3 = D[d3].GetValue(next3) as Item;
                    next4 = D[d4].GetValue(next4) as Item;
                    if (next3 == null || next4 == null)
                        break;
                    if (next3.IsEnabled && next4.IsEnabled)
                        count++;
                }
                next1 = D[d1].GetValue(next1) as Item;
                next2 = D[d2].GetValue(next2) as Item;
            }
        }
        return count;
    }
}

1 5 8 9 --------------------编程问答-------------------- 2 3 4能构成等边吗 --------------------编程问答--------------------
引用 90 楼 ZIP_xG 的回复:

    static void Main(string[] args)
    {
        List<Item> items = new List<Item>();
        Item item1 = new Item(1);
        Item item2 = new Item(2);
        Item item3 = new Item(3);
        Item item4 = new Item(4);
        Item item5 = new Item(5);
        Item item6 = new Item(6);
        Item item7 = new Item(7);
        Item item8 = new Item(8);
        Item item9 = new Item(9);
        Item item10 = new Item(10);

        item1.SetItem(item2, 6);
        item1.SetItem(item3, 5);

        item2.SetItem(item4, 6);
        item2.SetItem(item5, 5);
        item2.SetItem(item3, 4);

        item3.SetItem(item5, 6);
        item3.SetItem(item6, 5);

        item4.SetItem(item7, 6);
        item4.SetItem(item8, 5);
        item4.SetItem(item5, 4);

        item5.SetItem(item8, 6);
        item5.SetItem(item9, 5);
        item5.SetItem(item6, 4);

        item6.SetItem(item9, 6);
        item6.SetItem(item10, 5);

        item7.SetItem(item8, 4);
        item8.SetItem(item9, 4);
        item9.SetItem(item10, 4);

        items.Add(item1);
        items.Add(item2);
        items.Add(item3);
        items.Add(item4);
        items.Add(item5);
        items.Add(item6);
        items.Add(item7);
        items.Add(item8);
        items.Add(item9);
        items.Add(item10);

        List<Item> result = new List<Item>();

        Item pick = items.Where(t => t.IsEnabled).OrderByDescending(t => t.GetTriangle()).FirstOrDefault();
        int count = pick.GetTriangle();
        while (count > 0)
        {
            result.Add(pick);
            pick.IsEnabled = false;
            pick = items.Where(t => t.IsEnabled).OrderByDescending(t => t.GetTriangle()).FirstOrDefault();
            if (pick == null)
                count = 0;
            else
                count = pick.GetTriangle();
        }

        foreach (Item item in result)
        {
            Console.WriteLine(item.ID);
        }

        Console.ReadLine();
    }
}

class Item
{
    public Item(int id)
    {
        ID = id;
        IsEnabled = true;
    }

    public int ID { get; private set; }

    static Item()
    {
        var type = typeof(Item);
        D = new PropertyInfo[6];
        D[0] = type.GetProperty("D1");
        D[1] = type.GetProperty("D2");
        D[2] = type.GetProperty("D3");
        D[3] = type.GetProperty("D4");
        D[4] = type.GetProperty("D5");
        D[5] = type.GetProperty("D6");
    }

    private static PropertyInfo[] D;
    public Item D1 { get; private set; }
    public Item D2 { get; private set; }
    public Item D3 { get; private set; }
    public Item D4 { get; private set; }
    public Item D5 { get; private set; }
    public Item D6 { get; private set; }

    public void SetItem(Item item, int d)
    {
        var property = D[d - 1];
        property.SetValue(this, item);
        if (D[GetDirection(d + 3) - 1].GetValue(item) == null)
        {
            D[GetDirection(d + 3) - 1].SetValue(item, this);
        }
    }

    private int GetDirection(int d)
        {
            if (d > 6)
                d -= 6;
            return d;
        }

    public bool IsEnabled { get; set; }

    public int GetTriangle()
    {
        int count = 0;
        for (int i = 1; i < 7; i++)
        {
            int d1 = i - 1;
            int d2 = GetDirection(i + 1) - 1;
            int d3 = GetDirection(i + 2) - 1;
            int d4 = GetDirection(i + 3) - 1;
            Item next1 = D[d1].GetValue(this) as Item;
            Item next2 = D[d2].GetValue(this) as Item;
            while (next1 != null && next2 != null)
            {
                if (next1.IsEnabled && next2.IsEnabled)
                    count++;
                Item next3 = next1;
                Item next4 = next2;
                while (D[d3].GetValue(next3) != next2)
                {
                    next3 = D[d3].GetValue(next3) as Item;
                    next4 = D[d4].GetValue(next4) as Item;
                    if (next3 == null || next4 == null)
                        break;
                    if (next3.IsEnabled && next4.IsEnabled)
                        count++;
                }
                next1 = D[d1].GetValue(next1) as Item;
                next2 = D[d2].GetValue(next2) as Item;
            }
        }
        return count;
    }
}

1 5 8 9

打错了,是5 1 9 8。300分是第一个独享么。 --------------------编程问答--------------------
引用 90 楼 ZIP_xG 的回复:

    static void Main(string[] args)
    {
        List<Item> items = new List<Item>();
        Item item1 = new Item(1);
        Item item2 = new Item(2);
        Item item3 = new Item(3);
        Item item4 = new Item(4);
        Item item5 = new Item(5);
        Item item6 = new Item(6);
        Item item7 = new Item(7);
        Item item8 = new Item(8);
        Item item9 = new Item(9);
        Item item10 = new Item(10);

        item1.SetItem(item2, 6);
        item1.SetItem(item3, 5);

        item2.SetItem(item4, 6);
        item2.SetItem(item5, 5);
        item2.SetItem(item3, 4);

        item3.SetItem(item5, 6);
        item3.SetItem(item6, 5);

        item4.SetItem(item7, 6);
        item4.SetItem(item8, 5);
        item4.SetItem(item5, 4);

        item5.SetItem(item8, 6);
        item5.SetItem(item9, 5);
        item5.SetItem(item6, 4);

        item6.SetItem(item9, 6);
        item6.SetItem(item10, 5);

        item7.SetItem(item8, 4);
        item8.SetItem(item9, 4);
        item9.SetItem(item10, 4);

        items.Add(item1);
        items.Add(item2);
        items.Add(item3);
        items.Add(item4);
        items.Add(item5);
        items.Add(item6);
        items.Add(item7);
        items.Add(item8);
        items.Add(item9);
        items.Add(item10);

        List<Item> result = new List<Item>();

        Item pick = items.Where(t => t.IsEnabled).OrderByDescending(t => t.GetTriangle()).FirstOrDefault();
        int count = pick.GetTriangle();
        while (count > 0)
        {
            result.Add(pick);
            pick.IsEnabled = false;
            pick = items.Where(t => t.IsEnabled).OrderByDescending(t => t.GetTriangle()).FirstOrDefault();
            if (pick == null)
                count = 0;
            else
                count = pick.GetTriangle();
        }

        foreach (Item item in result)
        {
            Console.WriteLine(item.ID);
        }

        Console.ReadLine();
    }
}

class Item
{
    public Item(int id)
    {
        ID = id;
        IsEnabled = true;
    }

    public int ID { get; private set; }

    static Item()
    {
        var type = typeof(Item);
        D = new PropertyInfo[6];
        D[0] = type.GetProperty("D1");
        D[1] = type.GetProperty("D2");
        D[2] = type.GetProperty("D3");
        D[3] = type.GetProperty("D4");
        D[4] = type.GetProperty("D5");
        D[5] = type.GetProperty("D6");
    }

    private static PropertyInfo[] D;
    public Item D1 { get; private set; }
    public Item D2 { get; private set; }
    public Item D3 { get; private set; }
    public Item D4 { get; private set; }
    public Item D5 { get; private set; }
    public Item D6 { get; private set; }

    public void SetItem(Item item, int d)
    {
        var property = D[d - 1];
        property.SetValue(this, item);
        if (D[GetDirection(d + 3) - 1].GetValue(item) == null)
        {
            D[GetDirection(d + 3) - 1].SetValue(item, this);
        }
    }

    private int GetDirection(int d)
        {
            if (d > 6)
                d -= 6;
            return d;
        }

    public bool IsEnabled { get; set; }

    public int GetTriangle()
    {
        int count = 0;
        for (int i = 1; i < 7; i++)
        {
            int d1 = i - 1;
            int d2 = GetDirection(i + 1) - 1;
            int d3 = GetDirection(i + 2) - 1;
            int d4 = GetDirection(i + 3) - 1;
            Item next1 = D[d1].GetValue(this) as Item;
            Item next2 = D[d2].GetValue(this) as Item;
            while (next1 != null && next2 != null)
            {
                if (next1.IsEnabled && next2.IsEnabled)
                    count++;
                Item next3 = next1;
                Item next4 = next2;
                while (D[d3].GetValue(next3) != next2)
                {
                    next3 = D[d3].GetValue(next3) as Item;
                    next4 = D[d4].GetValue(next4) as Item;
                    if (next3 == null || next4 == null)
                        break;
                    if (next3.IsEnabled && next4.IsEnabled)
                        count++;
                }
                next1 = D[d1].GetValue(next1) as Item;
                next2 = D[d2].GetValue(next2) as Item;
            }
        }
        return count;
    }
}

1 5 8 9

第一个用程序的正确版本出现了,不过并非是全部解。 --------------------编程问答--------------------
引用 93 楼 caozhy 的回复:
Quote: 引用 90 楼 ZIP_xG 的回复:


    static void Main(string[] args)
    {
        List<Item> items = new List<Item>();
        Item item1 = new Item(1);
        Item item2 = new Item(2);
        Item item3 = new Item(3);
        Item item4 = new Item(4);
        Item item5 = new Item(5);
        Item item6 = new Item(6);
        Item item7 = new Item(7);
        Item item8 = new Item(8);
        Item item9 = new Item(9);
        Item item10 = new Item(10);

        item1.SetItem(item2, 6);
        item1.SetItem(item3, 5);

        item2.SetItem(item4, 6);
        item2.SetItem(item5, 5);
        item2.SetItem(item3, 4);

        item3.SetItem(item5, 6);
        item3.SetItem(item6, 5);

        item4.SetItem(item7, 6);
        item4.SetItem(item8, 5);
        item4.SetItem(item5, 4);

        item5.SetItem(item8, 6);
        item5.SetItem(item9, 5);
        item5.SetItem(item6, 4);

        item6.SetItem(item9, 6);
        item6.SetItem(item10, 5);

        item7.SetItem(item8, 4);
        item8.SetItem(item9, 4);
        item9.SetItem(item10, 4);

        items.Add(item1);
        items.Add(item2);
        items.Add(item3);
        items.Add(item4);
        items.Add(item5);
        items.Add(item6);
        items.Add(item7);
        items.Add(item8);
        items.Add(item9);
        items.Add(item10);

        List<Item> result = new List<Item>();

        Item pick = items.Where(t => t.IsEnabled).OrderByDescending(t => t.GetTriangle()).FirstOrDefault();
        int count = pick.GetTriangle();
        while (count > 0)
        {
            result.Add(pick);
            pick.IsEnabled = false;
            pick = items.Where(t => t.IsEnabled).OrderByDescending(t => t.GetTriangle()).FirstOrDefault();
            if (pick == null)
                count = 0;
            else
                count = pick.GetTriangle();
        }

        foreach (Item item in result)
        {
            Console.WriteLine(item.ID);
        }

        Console.ReadLine();
    }
}

class Item
{
    public Item(int id)
    {
        ID = id;
        IsEnabled = true;
    }

    public int ID { get; private set; }

    static Item()
    {
        var type = typeof(Item);
        D = new PropertyInfo[6];
        D[0] = type.GetProperty("D1");
        D[1] = type.GetProperty("D2");
        D[2] = type.GetProperty("D3");
        D[3] = type.GetProperty("D4");
        D[4] = type.GetProperty("D5");
        D[5] = type.GetProperty("D6");
    }

    private static PropertyInfo[] D;
    public Item D1 { get; private set; }
    public Item D2 { get; private set; }
    public Item D3 { get; private set; }
    public Item D4 { get; private set; }
    public Item D5 { get; private set; }
    public Item D6 { get; private set; }

    public void SetItem(Item item, int d)
    {
        var property = D[d - 1];
        property.SetValue(this, item);
        if (D[GetDirection(d + 3) - 1].GetValue(item) == null)
        {
            D[GetDirection(d + 3) - 1].SetValue(item, this);
        }
    }

    private int GetDirection(int d)
        {
            if (d > 6)
                d -= 6;
            return d;
        }

    public bool IsEnabled { get; set; }

    public int GetTriangle()
    {
        int count = 0;
        for (int i = 1; i < 7; i++)
        {
            int d1 = i - 1;
            int d2 = GetDirection(i + 1) - 1;
            int d3 = GetDirection(i + 2) - 1;
            int d4 = GetDirection(i + 3) - 1;
            Item next1 = D[d1].GetValue(this) as Item;
            Item next2 = D[d2].GetValue(this) as Item;
            while (next1 != null && next2 != null)
            {
                if (next1.IsEnabled && next2.IsEnabled)
                    count++;
                Item next3 = next1;
                Item next4 = next2;
                while (D[d3].GetValue(next3) != next2)
                {
                    next3 = D[d3].GetValue(next3) as Item;
                    next4 = D[d4].GetValue(next4) as Item;
                    if (next3 == null || next4 == null)
                        break;
                    if (next3.IsEnabled && next4.IsEnabled)
                        count++;
                }
                next1 = D[d1].GetValue(next1) as Item;
                next2 = D[d2].GetValue(next2) as Item;
            }
        }
        return count;
    }
}

1 5 8 9

第一个用程序的正确版本出现了,不过并非是全部解。

你说的是可以旋转呢,还是指不是旋转的其它结果? --------------------编程问答--------------------

class Program
{
    static void Main(string[] args)
    {
        List<Item> items = new List<Item>();
        Item item1 = new Item(1, 7, 10);
        Item item2 = new Item(2, 8, 6);
        Item item3 = new Item(3, 4, 9);
        Item item4 = new Item(4, 9, 3);
        Item item5 = new Item(5, 5, 5);
        Item item6 = new Item(6, 2, 8);
        Item item7 = new Item(7, 10, 1);
        Item item8 = new Item(8, 6, 2);
        Item item9 = new Item(9, 3, 4);
        Item item10 = new Item(10, 1, 7);

        item1.SetItem(item2, 6);
        item1.SetItem(item3, 5);

        item2.SetItem(item4, 6);
        item2.SetItem(item5, 5);
        item2.SetItem(item3, 4);

        item3.SetItem(item5, 6);
        item3.SetItem(item6, 5);

        item4.SetItem(item7, 6);
        item4.SetItem(item8, 5);
        item4.SetItem(item5, 4);

        item5.SetItem(item8, 6);
        item5.SetItem(item9, 5);
        item5.SetItem(item6, 4);

        item6.SetItem(item9, 6);
        item6.SetItem(item10, 5);

        item7.SetItem(item8, 4);
        item8.SetItem(item9, 4);
        item9.SetItem(item10, 4);

        items.Add(item1);
        items.Add(item2);
        items.Add(item3);
        items.Add(item4);
        items.Add(item5);
        items.Add(item6);
        items.Add(item7);
        items.Add(item8);
        items.Add(item9);
        items.Add(item10);

        List<Item> result = new List<Item>();

        Item pick = items.Where(t => t.IsEnabled).OrderByDescending(t => t.GetTriangle()).FirstOrDefault();
        int count = pick.GetTriangle();
        while (count > 0)
        {
            result.Add(pick);
            pick.IsEnabled = false;
            pick = items.Where(t => t.IsEnabled).OrderByDescending(t => t.GetTriangle()).FirstOrDefault();
            if (pick == null)
                count = 0;
            else
                count = pick.GetTriangle();
        }

        for (int i = 0; i < 3; i++)
        {
            foreach (Item item in result)
            {
                Console.Write(item.ID[i] + ";");
            }
            Console.WriteLine();
        }

        Console.ReadLine();
    }
}

class Item
{
    public Item(int id1, int id2, int id3)
    {
        ID = new int[] { id1, id2, id3 };
        IsEnabled = true;
    }

    public int[] ID { get; private set; }

    static Item()
    {
        var type = typeof(Item);
        D = new PropertyInfo[6];
        D[0] = type.GetProperty("D1");
        D[1] = type.GetProperty("D2");
        D[2] = type.GetProperty("D3");
        D[3] = type.GetProperty("D4");
        D[4] = type.GetProperty("D5");
        D[5] = type.GetProperty("D6");
    }

    private static PropertyInfo[] D;
    public Item D1 { get; private set; }
    public Item D2 { get; private set; }
    public Item D3 { get; private set; }
    public Item D4 { get; private set; }
    public Item D5 { get; private set; }
    public Item D6 { get; private set; }

    public void SetItem(Item item, int d)
    {
        var property = D[d - 1];
        property.SetValue(this, item);
        if (D[GetDirection(d + 3) - 1].GetValue(item) == null)
        {
            D[GetDirection(d + 3) - 1].SetValue(item, this);
        }
    }

    private int GetDirection(int d)
        {
            if (d > 6)
                d -= 6;
            return d;
        }

    public bool IsEnabled { get; set; }

    public int GetTriangle()
    {
        int count = 0;
        for (int i = 1; i < 7; i++)
        {
            int d1 = i - 1;
            int d2 = GetDirection(i + 1) - 1;
            int d3 = GetDirection(i + 2) - 1;
            int d4 = GetDirection(i + 3) - 1;
            Item next1 = D[d1].GetValue(this) as Item;
            Item next2 = D[d2].GetValue(this) as Item;
            while (next1 != null && next2 != null)
            {
                if (next1.IsEnabled && next2.IsEnabled)
                    count++;
                Item next3 = next1;
                Item next4 = next2;
                while (D[d3].GetValue(next3) != next2)
                {
                    next3 = D[d3].GetValue(next3) as Item;
                    next4 = D[d4].GetValue(next4) as Item;
                    if (next3 == null || next4 == null)
                        break;
                    if (next3.IsEnabled && next4.IsEnabled)
                        count++;
                }
                next1 = D[d1].GetValue(next1) as Item;
                next2 = D[d2].GetValue(next2) as Item;
            }
        }
        return count;
    }
}

带旋转后的答案的。
5;1;9;8;
5;7;3;6;
5;10;4;2; --------------------编程问答--------------------
引用 71 楼 wanghui0380 的回复:
二叉树中序遍历就ok了,遍历一边就ok。每个点都遍历到,条件自然就完备了

二叉我也想过,但怎么遍历呢?从1开始?要去掉1的时候呢?
85楼,我用组合遍历做出来了,但确实感觉不太优美。 --------------------编程问答-------------------- 我的想法,一共有15个三角形。然后对1-10进行统计,数字5最多,剔除。然后进行下次统计,所有数字的概率相同,取1,在进行统计。直到进行完毕。2,3,4,6,8,9第一次统计都是5次从2开始取,……具体代码还在思考 --------------------编程问答--------------------
引用 88 楼 caozhy 的回复:
Quote: 引用 85 楼 sj178220709 的回复:

using System;
using System.Collections.Generic;
using System.Text;

namespace Consoletest001.MyGame
{
    public  class  Point
    {
        public Point(double x, double y)
        {
            this.X = x;
            this.Y = y;
        }
         private static double GetLenght(Point p1 ,Point p2)
         {
           return  Math.Sqrt(Math.Pow(p1.X - p2.X, 2) + Math.Pow(p1.Y - p2.Y, 2));
         }
         private static bool IsEqual(double l1, double l2,double l3)
         {
             if (Math.Abs(l1-l2)<0.001 && Math.Abs(l2-l3)<0.001 && Math.Abs(l3-l1)<0.001 )
             {
                 return true;
             }
             return false;
         }
         public static bool IsTrl(Point p1, Point p2,Point p3)
         {
             if (IsEqual(GetLenght(p1,p2),GetLenght(p2,p3),GetLenght(p1,p3)) )
             {
                 return true;
             }
             return false;
         }
         public double X { get; set; }
         public double Y { get; set; }
    }
   public  class TenPointGame
    {
        public  Point [] tenP = new  Point[11];
        public TenPointGame()
        {
            InitTenPints();
        }
        public bool IsTrl(int p1, int p2,int p3)
        {
            return Point.IsTrl(this.tenP[p1], this.tenP[p2], this.tenP[p3]);
        }
        private void InitTenPints()
        {
            double q3 = Math.Sqrt(3);
           
                tenP[1] = new Point(3,3*q3);
                tenP[2] = new Point(2, 2 * q3); 
                tenP[3] = new Point(4, 2 * q3); 
                tenP[4] = new Point(1,  q3); 
                tenP[5] = new Point(3,  q3); 
                tenP[6] = new Point(5,  q3); 
                tenP[7] = new Point(0, 0); 
                tenP[8] = new Point(2, 0); 
                tenP[9] = new Point(4, 0); 
                tenP[10] = new Point(6, 0); 
        }

       private IList<int[]> results = new List<int[]>();

       /// <summary>
       /// 组合算法,a为目标集合,n为集合数目,m和M为取的个数,b为new int[m]
       /// </summary>
        public void combine(int[] a, int n, int m, int[] b, int M )
        {

            for (int i = n; i >= m; i--) // 注意这里的循环范围
            {
                b[m - 1] = i - 1;
                if (m > 1)
                    combine(a, i - 1, m - 1, b, M);
                else // m == 1, 输出一个组合
                {
                    int[] temp = new int[M];

                    for (int j = M - 1; j >= 0; j--)
                    {
                        
                        temp[j] = a[b[j]];
                    }
                    results.Add(temp);
                  
                }
            }
        }

       /// <summary>
       /// 验证结果集的一种,里面的所有3个点,都不能组成正三角形,则返回true
       /// </summary>
       /// <param name="relust3"></param>
       /// <returns></returns>
        public bool allFaile(int[] relust6)
       {
           int[] b2 = new int[3];
           this.results.Clear();
           this.combine(relust6, 6, 3, b2, 3);
           IList<int[]> results3 = new List<int[]>();
           this.comcopy(this.results, results3);
           int countSucess = 0;
           foreach (var p3 in results3)
           {
               if (this.IsTrl(p3[0], p3[1], p3[2]))
               {
                   countSucess++;
                   break;
               }
           }
           if (countSucess == 0)
           {
               return true;
           }
           else
           {
               return false;
           }
       }

       public void comcopy(IList<int[]> oldList ,IList<int[]> newList)
       {
           foreach (var intse in oldList)
           {
               newList.Add(intse);
           }
       }

       public string printResult(int[] List)
       {
           string str = "";
           foreach (int i in List)
           {
               str += i + " ";
           }
           return str;
       }

       public static void Maintest1()
        {
            TenPointGame game = new TenPointGame();
         
           IList<string> resultstr = new List<string>();

           int[] a = {1,2,3,4,5,6,7,8,9,10};

            int[] b = new int[6] ;
            game.results.Clear();
           game.combine(a,10,6,b,6);
           IList<int[]> results6 = new List<int[]>( );
           game.comcopy(game.results, results6);
           int count = 0;
           for (int i = 0; i < results6.Count;i++ )
           {
               if (game.allFaile(results6[i]) )
               {
                   resultstr.Add(game.printResult(results6[i]));
               }
           }

           Console.WriteLine(resultstr[0]);
        }
    }
}

你可以对照下81楼。


268不是正三角形?斜着就看不见了是吧?
这个不是我算的,是机器算的,机器是不可能出错的。
而且我的算法,原则上结果只可能多算,不可能少算。 --------------------编程问答-------------------- 乌龙了 ,87楼的内容 楼主帮忙编辑下,
组合算法来自
http://blog.csdn.net/sharpdew/article/details/755074
不是那楼说的,把那楼编辑了吧,谢谢。 --------------------编程问答--------------------
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,