1 /* 2 这道题目有一定的思维量, 3 说是有M,L两个总量,A[1]...A[N], 4 最后要使得 M+L>=sum(A[1]...A[N])....其中A[i]必须用其中一种装 5 之前的想法: 6 用 dp[i][j]:表示装到第i个物品,M中还有j没装,我们知道(M-j)+(L-j'....
分类:
其他好文 时间:
2014-06-18 14:46:55
阅读次数:
203
namespace System.Web.Mvc.Html{ public static class helperext { public static HtmlString mylabel(this HtmlHelper helper, string text) ...
分类:
Web程序 时间:
2014-06-18 14:40:25
阅读次数:
199
一、服务端-server.c#include #include #include #include #include #include #include #define MAXPENDING 5#define BUFFSIZE 32void Die(char *mess){ perror(me...
分类:
其他好文 时间:
2014-06-18 14:21:55
阅读次数:
154
Java1.5提供了关键字enum,能够通过该关键字方便得定义自己须要的枚举类型,比方enumSeason{SPRING,SUMMER,AUTUMN,WINTER}就定义了一个季节枚举类型。在本例中,对于Season.SPRING这个对象,Season.SPRING.name()能够得到该对象的字符...
分类:
编程语言 时间:
2014-06-18 14:19:54
阅读次数:
213
package foo;public class Main { public static void bubbleSort(int[] a, int len) { int in, out; for (out = len - 1; out > 0; --out) { ...
分类:
其他好文 时间:
2014-06-18 14:18:37
阅读次数:
158
判断给定的有向图中是否存在负环。 利用 spfa 算法判断负环有两种方法: 1) spfa 的 dfs 形式,判断条件是存在一点在一条路径上出现多次。 2) spfa 的 bfs 形式,判断条件是存在一点入队次数大于总顶点数。 代码如下:法 1 (spfa 的 dfs 形式):#include #i...
分类:
其他好文 时间:
2014-06-18 14:12:46
阅读次数:
1042
private void OpenFolderAndSelectFile(String fileFullName){ System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("Explo...
分类:
其他好文 时间:
2014-06-18 14:06:16
阅读次数:
219
[HttpPost]public HttpResponseMessage Upload(){string json = "{\"result\":\"true\"}";return new HttpResponseMessage { Content = new StringContent(json,...
string[] imgname; MODEL.Strategy modelMenu = bllMenu.GetModel(int.Parse(strId)); imgname = getPicUrl.getPicUrls(modelMenu...
分类:
其他好文 时间:
2014-06-17 14:12:17
阅读次数:
182
1.复制构造函数可用于:(1)根据另一个同类型的对象显示或隐式初始化一个对象string str1="test"; //隐式string str2=str1; //显示str1为先调用string的字符串形参的构造函数,创建一个临时对象,然后,使用string复制构造函数将str1初始化为那...
分类:
编程语言 时间:
2014-06-17 14:02:29
阅读次数:
156