链表: 每个元素,都有一个指针,指向下一个元素 //链表 function LinkedList(){ var head = null; length = 0; this.append = function(ele){ var cnode = { ele:ele, next:null }; if(head === null){ head = cnode; }else{ //追加到节点 var current = head; while(current.next){ current = curre…
http://acm.hdu.edu.cn/showproblem.php?pid=5009 2014网络赛 西安 比较难的题 Paint Pearls Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1951 Accepted Submission(s): 631 Problem Description Lee has a str…