码迷,mamicode.com
首页 > 其他好文
设计模式概述【整理】
设计模式不是很快的提高你的编码能力,设计模式的学习,旨在避免重复编码,减少劳动量。学习设计模式,对提高编写高效代码,大有裨益。学习设计模式,首先引入设计原则。【转载使用,请注明出处:http://blog.csdn.net/mahoking】...
分类:其他好文   时间:2014-08-11 21:27:02    阅读次数:217
HDU2988 Dark roads 【最小生成树Kruskal】
Dark roads Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 583    Accepted Submission(s): 253 Problem Description Economic times th...
分类:其他好文   时间:2014-08-11 21:26:42    阅读次数:208
hdu 1181 变形课
hdu 1181 变形课 搜索 或者最短路(条条大道通罗马)...
分类:其他好文   时间:2014-08-11 21:26:32    阅读次数:279
POJ 3259 Wormholes(SPFA)
Description While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination a...
分类:其他好文   时间:2014-08-11 21:26:02    阅读次数:310
双链表&链表合并&多项式相加算法
//单链表的合并 //链表合并 //两个链表必须是有序的 #define Maxsize 5 typedef  int elemtype; typedef struct linklist {    elemtype data;    struct linklist *next; }Linklist;  //建立链表1 Linklist *CreateList1 () ...
分类:其他好文   时间:2014-08-11 21:25:52    阅读次数:346
hdu 4638 Group (莫队算法)
题目大意: n个人的编号是从1 - n  ,现在他们无序的站成一排。 第 id 号人和 id-1  id +1 号人是朋友, 朋友之间可以组成group。 一个group的值等于他们人数的平方。 然后有m次询问,问给出的l r 之间能构成group值的和的最大值的group数。 思路分析: 首先,我们面临着假设你知道这个区间有多少个group 你能知道得到最大值的时候grou...
分类:其他好文   时间:2014-08-11 21:25:22    阅读次数:315
UVA 10986 Sending email(SPFA)
There are n SMTP servers connected by network cables. Each of the m cables connects two computers and has a certain latency measured in milliseconds required to send an email message. What is the sh...
分类:其他好文   时间:2014-08-11 21:25:02    阅读次数:384
poj 3070 Fibonacci (矩阵快速幂求斐波那契数列的第n项)
题意就是用矩阵乘法来求斐波那契数列的第n项的后四位数。如果后四位全为0,则输出0,否则 输出后四位去掉前导0,也。。。就。。。是。。。说。。。输出Fn%10000。 题目说的如此清楚。。我居然还在%和/来找后四位还判断是不是全为0还输出时判断是否为0然后 去掉前导0。o(╯□╰)o 还有矩阵快速幂的幂是0时要特判。 P.S:今天下午就想好今天学一下矩阵乘法方面的知识,这题...
分类:其他好文   时间:2014-08-11 21:24:53    阅读次数:271
UVA - 11986 Save from Radiation
Description J Save from Radiation Most of you are aware of Nuclear Power Plant Explosion at Fukushima after devastating earth quake and tsunami. Many people in Bangladesh ...
分类:其他好文   时间:2014-08-11 21:24:43    阅读次数:252
HDU 4406 GPA(网络流-最大费用流)
HDU 4406 GPA(网络流-最大费用流) 题目大意: 有m门课,n天,每天可以复习特定的几门课,每门课有学分,基础分,复习一次可以加分,绩点有计算公式,问你总绩点最多多少? 解题思路: 用最大费用流可以做。...
分类:其他好文   时间:2014-08-11 21:24:23    阅读次数:295
CUGBACM_Summer_Tranning5
A.Number Assignment UvaLive6434 简单题 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using ...
分类:其他好文   时间:2014-08-11 21:24:12    阅读次数:393
HDU 1503 Advanced Fruits (LCS,DP)
题意:给你两字符串s1,s2,用最短的字符串表示他们(公共字串输出一次)。 Sample Input apple peach ananas banana pear peach   Sample Output appleach bananas pearch dp[i][j] : 第一个字符串的前 i 个 ,和第二个字符串的前 j 个最...
分类:其他好文   时间:2014-08-11 21:24:02    阅读次数:264
poj 2549 --- 传说中的用“桶”防止HASH冲突
http://poj.org/problem?id=2549 维基百科有3Sum算法:https://en.wikipedia.org/wiki/3SUM sort(S); for i=0 to n-3 do a = S[i]; k = i+1; l = n-1; while (k<l) do b = S[k]; c = ...
分类:其他好文   时间:2014-08-11 21:23:53    阅读次数:356
POJ 3268 Silver Cow Party(SPFA)
Description One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big cow party to be held at farm #X (1 ≤ X ≤ N). A total of M (1 ≤ M ≤ 100,000) unidirectio...
分类:其他好文   时间:2014-08-11 21:23:43    阅读次数:303
Swift常量和变量以及命名规范
我们在上一章中介绍了如何使用Swift编写一个HelloWorld小程序,其中就用到了变量。常量和变量是构成表达式的重要组成部分。常量在声明和初始化变量时,在标识符的前面加上关键字let,就可以把该变量指定为一个常量。顾名思义,常量是其值在使用过程中不会发生变化的量,实例代码如下:let_Hello = "Hello"_Hello标识符就是常量,只能在初始化的时候被赋值,如果我们再次给_Hello...
分类:其他好文   时间:2014-08-11 21:23:12    阅读次数:288
HDU 2845 Beans(DP,最大不连续和)
题意 吃豆子游戏 当你吃了一个格子的豆子 该格子左右两个和上下两行就不能吃了 输入每个格子的豆子数 求你最多能吃多少颗豆子 可以先求出每行你最多可以吃多少颗豆子 然后每行就压缩成只有一个格子了 里面的豆子数就是那一行最多可以吃的豆子数 然后问题就变成求一列最多可以吃多少颗豆子了 和处理每一行一样处理 那么问题就简化成求一行数字的最大不连续和问题了 令d[i]表示某一行前i个豆子的最大和 有两种情况 吃第i个格子中的豆子和不吃第i个格子中的豆子 a[i]为...
分类:其他好文   时间:2014-08-11 21:23:02    阅读次数:333
Maven详解之仓库------本地仓库、远程仓库
maven的本地仓库和远程仓库,详解maven的远程仓库。 在实际开发中,快照版本的实际意义和作用。如何进行安全认证的配置?创建私服的好处,maven仓库依赖解析的机制...
分类:其他好文   时间:2014-08-11 21:22:52    阅读次数:309
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!