最小生成(支撑)树:
Prim普里姆算法
不断选择权值最小的边,始终保持一棵生成树,O(n^2),复杂度与边无关,适合稠密图。
Kruskal克鲁斯卡尔算法
每个顶点自成连通分量,选择[……]
click over here now omega replica watches. find out here now https://www.caomegawatches.com. click this site omega replica. here you can find the best omega speedmaster replica. navigate to this web-site https://www.goomegawatches.com. Go Here https://www.hkomegawatches.com. try this omega replica. best choice itomegawatches.com. Sale bell and ross replica watches. read this replica bell and ross. For details about replica bell and ross watch. visit https://www.moneybellross.com. useful site bell and ross replica. 80% off https://www.showbellross.com. you could try this out bell and ross replica. click reference https://www.healthbellross.com. additional info https://www.computerbellross.com. read this article loansbellross.com. our website tag heuer monaco replica. page https://www.businesstagheuer.com/.
Prim普里姆算法
不断选择权值最小的边,始终保持一棵生成树,O(n^2),复杂度与边无关,适合稠密图。
Kruskal克鲁斯卡尔算法
每个顶点自成连通分量,选择[……]
Counting sort计数排序:O(n+k) 共n个元素 整数范围0-k 稳定
将元素作为辅助数组的下标,统计每个对应元素出现的次数,遍历数组元素输出。[……]
Insert sort 插入排序 O(N^2) 稳定
void Insert_sort(int a[],int n) //插入排序
{[......]
首先用到了jQuery JavaScript Library v1.5.2,文件名是jquery.min.js,83.92KB(jquery.min.js)。
然后需要写一个script.js,内容如下,已经过普通压缩,要研究的自行排版。
$(function(){$(document).keydown(function(event){Typer.addText(event);})});var Typer={text:null,accessCountimer:null,index:0,speed:2,file:"",accessCount:0,deniedCount:0,init:function(){accessCountimer=setInterval(function(){Typer.updLstChr()},500);$.get(Typer.file,function(data){Typer.text=data;})},content:function(){return $("#console").html();},write:function(str){$("#console").append(str);return false},makeAccess:function(){Typer.hidepop();Typer.accessCount=0;var ddiv=$("<div id='gran'>").html("");ddiv.addClass("accessGranted");ddiv.html("<h1>ACCESS GRANTED</h1>");$(document.body).prepend(ddiv);return false},makeDenied:function(){Typer.hidepop();Typer.deniedCount=0;var ddiv=$("<div id='deni'>").html("");ddiv.addClass("accessDenied");ddiv.html("<h1>ACCESS DENIED</h1>");$(document.body).prepend(ddiv);return false},hidepop:function(){$("#deni").remove();$("#gran").remove()},addText:function(key){if(key.keyCode==18){Typer.accessCount++;if(Typer.accessCount>=3){Typer.makeAccess();}}else if(key.keyCode==20){Typer.deniedCount++;if(Typer.deniedCount>=3){Typer.makeDenied();}}else if(key.keyCode==27){Typer.hidepop();}else if(Typer.text){var cont=Typer.content();if(cont.substring(cont.length-1,cont.length)=="|")$("#console").html($("#console").html().substring(0,cont.length-1));if(key.keyCode!=8){Typer.index+=Typer.speed;}else{if(Typer.index>0)Typer.index-=Typer.speed;}var text=$("<div/>").text(Typer.text.substring(0,Typer.index)).html();var rtn=new RegExp("\n","g");var rts=new RegExp("\\s","g");var rtt=new RegExp("\\t","g");$("#console").html(text.replace(rtn,"<br/>").replace(rtt," ").replace(rts," "));window.scrollBy(0,50);}if(key.preventDefault&&key.keyCode!=122){key.preventDefault()};if(key.keyCode!=122){key.returnValue=false}},updLstChr:function(){var cont=this.content();if(cont.substring(cont.length-1,cont.length)=="|")$("#console").html($("#console").html().substring(0,cont.length-1));else this.write("|");}}
然后需要一个txt文本文件,内容是你要显示的代码界面内容。可以是任何编程语言,或者只有你自己看得懂的英文字母随机组合。我将其命名为 gyv.txt。
这是style.css。内容如下:
@charset "gb2312";body{background:#000000;color:#00FF00;font-family:monospace;}.accessGranted{position:absolute;top:200px;background:#333;padding:20px;border:1px solid #999;width:300px;left:50%;margin-left:-150px;text-align:center;}.accessDenied{position:absolute;top:200px;color:#F00;background:#511;padding:20px;border:1px solid #F00;width:300px;left:50%;margin-left:-150px;text-align:center;}
最后就是 index.html,要把上述的文件引用过来,如果按照我上面的文件名,就已经引用好了。
<!DOCTYPE html> <html lang="en"> <head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="style.css" rel="stylesheet" type="text/css"> <script src="jquery.min.js" type="text/javascript"></script><style type="text/css"></style> <script src="script.js" type="text/javascript"></script> <script type="text/javascript"> Typer.speed = 8;//按下一个按键出现多少个字符 Typer.file = 'gyv.txt';//读取的文件 Typer.init(); </script> <title>HT</title></head> <body> <div id="console"></div> </body> </html>
[……]