原创 D3.JS實例,旋轉的色彩方塊
Talk is cheap,show me the code. http://www.w3school.com.cn/tiy/t.asp?f=html_basic,把下面代碼複製到這個網站上觀看。 做出這個的步驟, 1.先加入svg 2.
原创 經典Dp-單調遞增最長子序列(經典dp)
單調遞增最長子序列 時間限制:3000 ms | 內存限制:65535 KB 難度:4 描述求一個字符串的最長遞增子序列的長度 如:dabdbf最長遞增子序列就是abdf,長度爲4 輸入第一行一個整數0<
原创 猴子選王-鏈表水題
#include<iostream> #include <fstream> using namespace std; struct NodeT { int n; NodeT *next,*front; }; NodeT*
原创 彩色圖轉灰度圖的研究--最最Easy版本,python+opencv
今天才開始看轉灰度圖,一堆論文頭都大了。 現在看把圖片從RGB模式轉爲灰度圖模式。首先看圖片是如何保存在數組裏的。 首先你試着調用img=cv2.read("ha.jpg") >>>img >>>array([[[138, 132, 12
原创 重建二叉樹
題目描述: 輸入某二叉樹的前序遍歷和中序遍歷的結果,請重建出該二叉樹。假設輸入的前序遍歷和中序遍歷的結果中都不含重複的數字。例如輸入前序遍歷序列{1,2,4,7,3,5,6,8}和中序遍歷序列{4,7,2,1,5,3,8,6},則重建二叉
原创 01揹包,開心的小明
http://acm.nyist.net/JudgeOnline/problem.php?pid=49 代碼其實不是自己的,開始自己寫,覺得自己跟他的完全一樣,但就是過不了,然後我一行一行改,終於發現錯誤。 #include <strin
原创 UVA 括號匹配
Parentheses Balance You are given a string consisting of parentheses () and []. A string of this type is said to
原创 UVa 11234 Expressions
一道樹的題目 #include <iostream> #include<deque> #include<algorithm> #include<cstdio> #include<stack> #include<string> #inclu
原创 Generalized Matrioshkas. poj 棧 POJ3195
Generalized Matrioshkas Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1816 Accepted: 528 Descriptio
原创 經典-動態規劃-嵌套矩陣
兩種解法,第一種是用DAG #include <iostream> #include <string.h> #include <fstream> using namespace std; struct rectT { int a,
原创 zoj1004 回溯
幹,平生第一次直接過了,就連一個最大上升字數列十多行的代碼我都WA好多次。哈哈,心寬體胖,打兩盤Kof開心開心。 Anagrams by Stack Time Limit: 2 Seconds Memory Limit: 65
原创 UVA 540 team queue
Team Queue Queues and Priority Queues are data structures which are known to most computer scientists. The Team Q
原创 樹的重建與遍歷
1.用遞歸的方法重建樹後,用Dps遍歷,至於爲何用Dps則是因爲要求出最小值, Tree You are to determine the value of the leaf node in a given binary t
原创 HDU--杭電--4502--吉哥系列故事——臨時工計劃--揹包--01揹包
吉哥系列故事——臨時工計劃Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 23
原创 UVA-133 雙向鏈表模擬題
The Dole Queue In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros