题意:求一个无向图的边权平均值最小的环思路:假设环中Σwi/t#include #include#include #include #define maxn 90000#define esp 0.00000001using namespace std;int head[maxn],point[max...
分类:
其他好文 时间:
2014-10-30 19:07:36
阅读次数:
225
适用场景:代码中经常会出现:根据条件创建实现了同一个接口的不用类实例,而这些判定条件可能随时变动,导致我们这个不得不去改动很多代码。备注:工厂方法在Head First中,被认为不是设计模式的一种,但人们经常使用,大家习惯性的叫,久了也就言传为“工厂方法模式”。解决了什么问题例如:string db...
分类:
其他好文 时间:
2014-10-30 13:10:26
阅读次数:
161
<!DOCTYPE html> <html> <head> ? ? <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> ? ? <!--meta name="format-detection" content="telephone=no"/> ? ? <meta name="viewport" ...
分类:
Web程序 时间:
2014-10-30 12:00:47
阅读次数:
176
关于nandflash的说明,请参考其他。现在先贴出来韦东山先生的代码,作我学习之用。@******************************************************************************@ File:head.s@ 功能:设置SDRAM,将程...
分类:
其他好文 时间:
2014-10-29 21:26:01
阅读次数:
178
zzx@sdcm152:~$ cat /etc/passwd |cut -f1 -d:|head -3 #或者 cut -f1 -d : 或者 cut -f1 -d ':'rootdaemonbinzzx@sdcm152:~$ cat /etc/passwd |cut -f1,3 -d:|h...
分类:
其他好文 时间:
2014-10-29 21:22:35
阅读次数:
113
1. ? git init 2 . ?git add file? ? ? ? git commit -m "message" 3. ? git log ? ? ? ?git log --graph --pretty=oneline --abbrev-commit 4. ? git reflog 5. ? git reset --hard HEAD^ ? ? ?...
分类:
其他好文 时间:
2014-10-29 19:53:42
阅读次数:
241
JS代码编写位置:1.编写在head节点中。如下代码所示:<head>
<scripttype="text/javascript">
window,load=function(){
alert("加载完成");
}
</script>
</head>2.编写在html标签内。<body>
<buttononclick="alert(‘HelloWorld!‘)">ClickMe&..
分类:
编程语言 时间:
2014-10-29 19:49:45
阅读次数:
220
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2014-10-29 19:09:20
阅读次数:
149
Given a linked list, remove thenthnode from the end of list and return its head.For example, Given linked list: 1->2->3->4->5, and n = 2. After re...
分类:
其他好文 时间:
2014-10-29 18:31:47
阅读次数:
191
最近在做前台效果的时候用到了JQuery提供的resize()事件。resize这个事件是监听浏览器窗口的放大与缩小,也就是说浏览器窗口大小的变化。我在W3CSCHOOL上面查阅的时候,提供了一个例子。W3C源码html>head>scripttype="text/javascript"src="/...
分类:
Web程序 时间:
2014-10-29 16:50:41
阅读次数:
295