11 2012 档案

摘要:题目1输入一个整形数组,数组里有正数也有负数。数组中连续的一个或多个整数组成一个子数组,每个子数组都有一个和。求所有子数组的和的最大值。要求时间复杂度为O(n)。例如输入的数组为1, -2, 3, 10, -4, 7, 2, -5,和最大的子数组为3, 10, -4, 7, 2,因此输出为该子数组的和18。View Code ///<summary>/// 获得数组最大子数组的和 ///</summary>///<param name="intArr">整形 数组</param>///<returns>最大子数组的 阅读全文
posted @ 2012-11-29 11:28 二哥(阿伟) 阅读(191) 评论(0) 推荐(0)
摘要:public partial class Form1 : Form { private bool flag = true; delegate void SetTextDelegate(Label label, string text); private Label[] labels; private Font font; public Form1() { InitializeComponent(); } /// <summary> /// 制... 阅读全文
posted @ 2012-11-21 15:31 二哥(阿伟) 阅读(839) 评论(0) 推荐(0)
摘要:1.启动多个线程,完成同一个任务(控制台应用程序):View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading;namespace ConsoleApplication1{ class Program { static internal Thread[] threads = new Thread[10]; public static void Main() { ... 阅读全文
posted @ 2012-11-02 16:56 二哥(阿伟) 阅读(182) 评论(0) 推荐(0)
摘要:原文链接:http://www.cnblogs.com/lilin123/archive/2012/11/01/2749169.htmlpublic static class ChineseToPinYin { private static readonly Dictionary<int, string> CodeCollections = new Dictionary<int, string> { { -20319, "a" }, { -20317, "ai" }, { -20304, "an" }, { - 阅读全文
posted @ 2012-11-01 15:44 二哥(阿伟) 阅读(265) 评论(0) 推荐(0)